Skip to content

Commit 8334712

Browse files
committed
Triplestore now uses mounted volume for storing journal file
1 parent 177099c commit 8334712

File tree

5 files changed

+196
-84
lines changed

5 files changed

+196
-84
lines changed

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,10 @@ ENV TOMCAT_DIR /usr/local/tomcat
44

55
COPY fedora.war blazegraph.war $TOMCAT_DIR/webapps/
66
COPY tomcat-users.xml $TOMCAT_DIR/conf/
7+
RUN cd $TOMCAT_DIR/webapps/ && \
8+
unzip -qq -u blazegraph.war -d blazegraph/ && \
9+
rm blazegraph.war
10+
11+
COPY GraphStore.properties web.xml RWStore.properties $TOMCAT_DIR/webapps/blazegraph/WEB-INF/
12+
COPY log4j.properties RWStore.properties $TOMCAT_DIR/webapps/blazegraph/WEB-INF/classes/
713
#COPY RWStore.properties $TOMCAT_DIR/webapps/blazegraph/WEB-INT/

GraphStore.properties

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#
2+
# Note: These options are applied when the journal and the triple store are
3+
# first created.
4+
5+
##
6+
## Journal options.
7+
##
8+
9+
# The backing file. This contains all your data. You want to put this someplace
10+
# safe. The default locator will wind up in the directory from which you start
11+
# your servlet container.
12+
com.bigdata.journal.AbstractJournal.file=/usr/share/blazegraph/blazegraph.jnl
13+
14+
# The persistence engine. Use 'Disk' for the WORM or 'DiskRW' for the RWStore.
15+
com.bigdata.journal.AbstractJournal.bufferMode=DiskRW
16+
17+
# Setup for the RWStore recycler rather than session protection.
18+
com.bigdata.service.AbstractTransactionService.minReleaseAge=1
19+
20+
# Enable group commit. See http://wiki.blazegraph.com/wiki/index.php/GroupCommit and BLZG-192.
21+
#com.bigdata.journal.Journal.groupCommit=true
22+
23+
com.bigdata.btree.writeRetentionQueue.capacity=4000
24+
com.bigdata.btree.BTree.branchingFactor=128
25+
26+
# 200M initial extent.
27+
com.bigdata.journal.AbstractJournal.initialExtent=209715200
28+
com.bigdata.journal.AbstractJournal.maximumExtent=209715200
29+
30+
##
31+
## Setup for triples mode + full text search but without inference.
32+
##
33+
com.bigdata.rdf.sail.truthMaintenance=false
34+
com.bigdata.rdf.store.AbstractTripleStore.quads=false
35+
com.bigdata.rdf.store.AbstractTripleStore.statementIdentifiers=false
36+
com.bigdata.rdf.store.AbstractTripleStore.textIndex=true
37+
com.bigdata.rdf.store.AbstractTripleStore.axiomsClass=com.bigdata.rdf.axioms.NoAxioms
38+
#com.bigdata.rdf.store.AbstractTripleStore.rdrHistoryClass=com.bigdata.rdf.sail.RDRHistory
39+
40+
# Bump up the branching factor for the lexicon indices on the default kb.
41+
com.bigdata.namespace.kb.lex.com.bigdata.btree.BTree.branchingFactor=400
42+
43+
# Bump up the branching factor for the statement indices on the default kb.
44+
com.bigdata.namespace.kb.spo.com.bigdata.btree.BTree.branchingFactor=1024

RWStore.properties

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,17 @@
99
# The backing file. This contains all your data. You want to put this someplace
1010
# safe. The default locator will wind up in the directory from which you start
1111
# your servlet container.
12-
com.bigdata.journal.AbstractJournal.file=/usr/share/blazegraph/bigdata.jnl
12+
com.bigdata.journal.AbstractJournal.file=/usr/share/blazegraph/blazegraph.jnl
1313

1414
# The persistence engine. Use 'Disk' for the WORM or 'DiskRW' for the RWStore.
1515
com.bigdata.journal.AbstractJournal.bufferMode=DiskRW
1616

1717
# Setup for the RWStore recycler rather than session protection.
1818
com.bigdata.service.AbstractTransactionService.minReleaseAge=1
1919

20+
# Enable group commit. See http://wiki.blazegraph.com/wiki/index.php/GroupCommit
21+
com.bigdata.journal.Journal.groupCommit=false
22+
2023
com.bigdata.btree.writeRetentionQueue.capacity=4000
2124
com.bigdata.btree.BTree.branchingFactor=128
2225

log4j.properties

Lines changed: 113 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,113 @@
1-
# Default log4j configuration. See the individual classes for the
2-
# specific loggers, but generally they are named for the class in
3-
# which they are defined.
4-
5-
# Default log4j configuration for testing purposes.
6-
#
7-
# You probably want to set the default log level to ERROR.
8-
#
9-
log4j.rootCategory=WARN, dest1
10-
#log4j.rootCategory=WARN, dest2
11-
12-
# Loggers.
13-
# Note: logging here at INFO or DEBUG will significantly impact throughput!
14-
log4j.logger.com.bigdata=WARN
15-
log4j.logger.com.bigdata.btree=WARN
16-
17-
# Normal data loader (single threaded).
18-
#log4j.logger.com.bigdata.rdf.store.DataLoader=INFO
19-
20-
# dest1
21-
log4j.appender.dest1=org.apache.log4j.ConsoleAppender
22-
log4j.appender.dest1.layout=org.apache.log4j.PatternLayout
23-
log4j.appender.dest1.layout.ConversionPattern=%-5p: %F:%L: %m%n
24-
#log4j.appender.dest1.layout.ConversionPattern=%-5p: %r %l: %m%n
25-
#log4j.appender.dest1.layout.ConversionPattern=%-5p: %m%n
26-
#log4j.appender.dest1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
27-
#log4j.appender.dest1.layout.ConversionPattern=%-4r(%d) [%t] %-5p %c(%l:%M) %x - %m%n
28-
29-
# dest2 includes the thread name and elapsed milliseconds.
30-
# Note: %r is elapsed milliseconds.
31-
# Note: %t is the thread name.
32-
# See http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html
33-
log4j.appender.dest2=org.apache.log4j.ConsoleAppender
34-
log4j.appender.dest2.layout=org.apache.log4j.PatternLayout
35-
log4j.appender.dest2.layout.ConversionPattern=%-5p: %r %X{hostname} %X{serviceUUID} %X{taskname} %X{timestamp} %X{resources} %t %l: %m%n
36-
37-
##
38-
# Rule execution log. This is a formatted log file (comma delimited).
39-
log4j.logger.com.bigdata.relation.rule.eval.RuleLog=INFO,ruleLog
40-
log4j.additivity.com.bigdata.relation.rule.eval.RuleLog=false
41-
log4j.appender.ruleLog=org.apache.log4j.FileAppender
42-
log4j.appender.ruleLog.Threshold=ALL
43-
log4j.appender.ruleLog.File=/usr/share/blazegraph/rules.log
44-
log4j.appender.ruleLog.Append=true
45-
# I find that it is nicer to have this unbuffered since you can see what
46-
# is going on and to make sure that I have complete rule evaluation logs
47-
# on shutdown.
48-
log4j.appender.ruleLog.BufferedIO=false
49-
log4j.appender.ruleLog.layout=org.apache.log4j.PatternLayout
50-
log4j.appender.ruleLog.layout.ConversionPattern=%m
51-
52-
##
53-
# Summary query evaluation log (tab delimited file). Uncomment the next line to enable.
54-
#log4j.logger.com.bigdata.bop.engine.QueryLog=INFO,queryLog
55-
log4j.additivity.com.bigdata.bop.engine.QueryLog=false
56-
log4j.appender.queryLog=org.apache.log4j.FileAppender
57-
log4j.appender.queryLog.Threshold=ALL
58-
log4j.appender.queryLog.File=/usr/share/blazegraph/queryLog.csv
59-
log4j.appender.queryLog.Append=true
60-
# I find that it is nicer to have this unbuffered since you can see what
61-
# is going on and to make sure that I have complete rule evaluation logs
62-
# on shutdown.
63-
log4j.appender.queryLog.BufferedIO=false
64-
log4j.appender.queryLog.layout=org.apache.log4j.PatternLayout
65-
log4j.appender.queryLog.layout.ConversionPattern=%m
66-
67-
##
68-
# BOp run state trace (tab delimited file). Uncomment the next line to enable.
69-
#log4j.logger.com.bigdata.bop.engine.RunState$TableLog=INFO,queryRunStateLog
70-
log4j.additivity.com.bigdata.bop.engine.RunState$TableLog=false
71-
log4j.appender.queryRunStateLog=org.apache.log4j.FileAppender
72-
log4j.appender.queryRunStateLog.Threshold=ALL
73-
log4j.appender.queryRunStateLog.File=/usr/share/blazegraph/queryRunState.log
74-
log4j.appender.queryRunStateLog.Append=true
75-
# I find that it is nicer to have this unbuffered since you can see what
76-
# is going on and to make sure that I have complete rule evaluation logs
77-
# on shutdown.
78-
log4j.appender.queryRunStateLog.BufferedIO=false
79-
log4j.appender.queryRunStateLog.layout=org.apache.log4j.PatternLayout
80-
log4j.appender.queryRunStateLog.layout.ConversionPattern=%m
1+
# Default log4j configuration. See the individual classes for the
2+
# specific loggers, but generally they are named for the class in
3+
# which they are defined.
4+
5+
# Default log4j configuration for testing purposes.
6+
#
7+
# You probably want to set the default log level to ERROR.
8+
#
9+
log4j.rootCategory=WARN, dest1
10+
#log4j.rootCategory=WARN, dest2
11+
12+
# Loggers.
13+
# Note: logging here at INFO or DEBUG will significantly impact throughput!
14+
log4j.logger.com.bigdata=WARN
15+
log4j.logger.com.bigdata.btree=WARN
16+
17+
# Normal data loader (single threaded).
18+
#log4j.logger.com.bigdata.rdf.store.DataLoader=INFO
19+
20+
# dest1
21+
log4j.appender.dest1=org.apache.log4j.ConsoleAppender
22+
log4j.appender.dest1.layout=org.apache.log4j.PatternLayout
23+
log4j.appender.dest1.layout.ConversionPattern=%-5p: %F:%L: %m%n
24+
#log4j.appender.dest1.layout.ConversionPattern=%-5p: %r %l: %m%n
25+
#log4j.appender.dest1.layout.ConversionPattern=%-5p: %m%n
26+
#log4j.appender.dest1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
27+
#log4j.appender.dest1.layout.ConversionPattern=%-4r(%d) [%t] %-5p %c(%l:%M) %x - %m%n
28+
29+
# dest2 includes the thread name and elapsed milliseconds.
30+
# Note: %r is elapsed milliseconds.
31+
# Note: %t is the thread name.
32+
# See http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html
33+
log4j.appender.dest2=org.apache.log4j.ConsoleAppender
34+
log4j.appender.dest2.layout=org.apache.log4j.PatternLayout
35+
log4j.appender.dest2.layout.ConversionPattern=%-5p: %r %X{hostname} %X{serviceUUID} %X{taskname} %X{timestamp} %X{resources} %t %l: %m%n
36+
37+
##
38+
# Rule execution log. This is a formatted log file (comma delimited).
39+
log4j.logger.com.bigdata.relation.rule.eval.RuleLog=INFO,ruleLog
40+
log4j.additivity.com.bigdata.relation.rule.eval.RuleLog=false
41+
log4j.appender.ruleLog=org.apache.log4j.FileAppender
42+
log4j.appender.ruleLog.Threshold=ALL
43+
log4j.appender.ruleLog.File=/usr/share/blazegraph/rules.log
44+
log4j.appender.ruleLog.Append=true
45+
# I find that it is nicer to have this unbuffered since you can see what
46+
# is going on and to make sure that I have complete rule evaluation logs
47+
# on shutdown.
48+
log4j.appender.ruleLog.BufferedIO=false
49+
log4j.appender.ruleLog.layout=org.apache.log4j.PatternLayout
50+
log4j.appender.ruleLog.layout.ConversionPattern=%m
51+
52+
##
53+
# Summary query evaluation log (tab delimited file). Uncomment the next line to enable.
54+
#log4j.logger.com.bigdata.bop.engine.QueryLog=INFO,queryLog
55+
log4j.additivity.com.bigdata.bop.engine.QueryLog=false
56+
log4j.appender.queryLog=org.apache.log4j.FileAppender
57+
log4j.appender.queryLog.Threshold=ALL
58+
log4j.appender.queryLog.File=/usr/share/blazegraph/queryLog.csv
59+
log4j.appender.queryLog.Append=true
60+
# I find that it is nicer to have this unbuffered since you can see what
61+
# is going on and to make sure that I have complete rule evaluation logs
62+
# on shutdown.
63+
log4j.appender.queryLog.BufferedIO=false
64+
log4j.appender.queryLog.layout=org.apache.log4j.PatternLayout
65+
log4j.appender.queryLog.layout.ConversionPattern=%m
66+
67+
##
68+
# BOp run state trace (tab delimited file). Uncomment the next line to enable.
69+
#log4j.logger.com.bigdata.bop.engine.RunState$TableLog=INFO,queryRunStateLog
70+
log4j.additivity.com.bigdata.bop.engine.RunState$TableLog=false
71+
log4j.appender.queryRunStateLog=org.apache.log4j.FileAppender
72+
log4j.appender.queryRunStateLog.Threshold=ALL
73+
log4j.appender.queryRunStateLog.File=/usr/share/blazegraph/queryRunState.log
74+
log4j.appender.queryRunStateLog.Append=true
75+
# I find that it is nicer to have this unbuffered since you can see what
76+
# is going on and to make sure that I have complete rule evaluation logs
77+
# on shutdown.
78+
log4j.appender.queryRunStateLog.BufferedIO=false
79+
log4j.appender.queryRunStateLog.layout=org.apache.log4j.PatternLayout
80+
log4j.appender.queryRunStateLog.layout.ConversionPattern=%m
81+
82+
##
83+
# Solutions trace (tab delimited file). Uncomment the next line to enable.
84+
#log4j.logger.com.bigdata.bop.engine.SolutionsLog=INFO,solutionsLog
85+
log4j.additivity.com.bigdata.bop.engine.SolutionsLog=false
86+
log4j.appender.solutionsLog=org.apache.log4j.ConsoleAppender
87+
#log4j.appender.solutionsLog=org.apache.log4j.FileAppender
88+
log4j.appender.solutionsLog.Threshold=ALL
89+
log4j.appender.solutionsLog.File=solutions.csv
90+
log4j.appender.solutionsLog.Append=true
91+
# I find that it is nicer to have this unbuffered since you can see what
92+
# is going on and to make sure that I have complete rule evaluation logs
93+
# on shutdown.
94+
log4j.appender.solutionsLog.BufferedIO=false
95+
log4j.appender.solutionsLog.layout=org.apache.log4j.PatternLayout
96+
log4j.appender.solutionsLog.layout.ConversionPattern=SOLUTION:\t%m
97+
98+
##
99+
# SPARQL query trace (plain text file). Uncomment 2nd line to enable.
100+
log4j.logger.com.bigdata.rdf.sparql.ast.eval.ASTEvalHelper=WARN
101+
#log4j.logger.com.bigdata.rdf.sparql.ast.eval.ASTEvalHelper=INFO,sparqlLog
102+
log4j.additivity.com.bigdata.rdf.sparql.ast.eval.ASTEvalHelper=false
103+
log4j.appender.sparqlLog=org.apache.log4j.ConsoleAppender
104+
#log4j.appender.sparqlLog=org.apache.log4j.FileAppender
105+
log4j.appender.sparqlLog.Threshold=ALL
106+
log4j.appender.sparqlLog.File=sparql.txt
107+
log4j.appender.sparqlLog.Append=true
108+
# I find that it is nicer to have this unbuffered since you can see what
109+
# is going on and to make sure that I have complete rule evaluation logs
110+
# on shutdown.
111+
log4j.appender.sparqlLog.BufferedIO=false
112+
log4j.appender.sparqlLog.layout=org.apache.log4j.PatternLayout
113+
log4j.appender.sparqlLog.layout.ConversionPattern=#----------%d-----------tx=%X{tx}\n%m\n

web.xml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@
1919
when starting the servlet container.
2020
</description>
2121
<!-- Note: This path is relative to the directory in which you start -->
22-
<!-- the servlet container. For the IDE, this is generally the root -->
22+
<!-- the servlet container or within the classpath as a resource. -->
23+
<!-- For the IDE, this is generally the root -->
2324
<!-- of the bigdata project. For the WAR, it depends where you start -->
2425
<!-- the servlet container. The "ant war" target rewrites this to be -->
2526
<!-- relative to the root of the servlet container by default. -->
2627
<param-name>propertyFile</param-name>
27-
<param-value>/usr/local/tomcat/webapps/bigdata/WEB-INF/RWStore.properties</param-value>
28+
<param-value>RWStore.properties</param-value>
2829
</context-param>
2930
<context-param>
3031
<description>The default bigdata namespace of for the triple or quad store
@@ -86,7 +87,7 @@
8687
<servlet-name>REST API</servlet-name>
8788
<display-name>REST API</display-name>
8889
<description>The REST API, including a SPARQL end point, as described at
89-
https://sourceforge.net/apps/mediawiki/bigdata/index.php?title=NanoSparqlServer
90+
https://wiki.blazegraph.com/wiki/index.php/NanoSparqlServer
9091
</description>
9192
<servlet-class>com.bigdata.rdf.sail.webapp.RESTServlet</servlet-class>
9293
<load-on-startup>0</load-on-startup>
@@ -101,6 +102,21 @@
101102
<servlet-class>com.bigdata.rdf.sail.webapp.MultiTenancyServlet</servlet-class>
102103
<async-supported>true</async-supported>
103104
</servlet>
105+
<servlet>
106+
<servlet-name>DataLoader</servlet-name>
107+
<display-name>DataLoader Servlet</display-name>
108+
<description>Servlet providing DataLoader functionality for bulk loading into
109+
a namespace.</description>
110+
<servlet-class>com.bigdata.rdf.sail.webapp.DataLoaderServlet</servlet-class>
111+
<async-supported>true</async-supported>
112+
</servlet>
113+
<servlet>
114+
<servlet-name>Backup</servlet-name>
115+
<display-name>Backup Servlet</display-name>
116+
<description>Servlet providing a REST API for creating online backups.</description>
117+
<servlet-class>com.bigdata.rdf.sail.webapp.BackupServlet</servlet-class>
118+
<async-supported>true</async-supported>
119+
</servlet>
104120
<servlet>
105121
<servlet-name>Transaction Management API</servlet-name>
106122
<display-name>Transaction Management API</display-name>
@@ -148,6 +164,16 @@
148164
<servlet-name>Multi-Tenancy API</servlet-name>
149165
<url-pattern>/namespace/*</url-pattern>
150166
</servlet-mapping>
167+
<!-- Mappings for the DataLoader Servlet API. -->
168+
<servlet-mapping>
169+
<servlet-name>DataLoader</servlet-name>
170+
<url-pattern>/dataloader</url-pattern>
171+
</servlet-mapping>
172+
<!-- Mappings for the Backup Servlet API. -->
173+
<servlet-mapping>
174+
<servlet-name>Backup</servlet-name>
175+
<url-pattern>/backup</url-pattern>
176+
</servlet-mapping>
151177
<!-- Mappings for the TX API. -->
152178
<servlet-mapping>
153179
<servlet-name>Transaction Management API</servlet-name>

0 commit comments

Comments
 (0)