You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2017/06/18 18:42:42 UTC
[1/5] jena git commit: Provide more details of setup (Fuseki
--verbose)
Repository: jena
Updated Branches:
refs/heads/master fbd93e37f -> 887def848
Provide more details of setup (Fuseki --verbose)
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/b304bc4c
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/b304bc4c
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/b304bc4c
Branch: refs/heads/master
Commit: b304bc4c00cccd0a1244e7c9541f577e89da630a
Parents: fbd93e3
Author: Andy Seaborne <an...@apache.org>
Authored: Sun Jun 18 18:12:45 2017 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Sun Jun 18 18:13:09 2017 +0100
----------------------------------------------------------------------
.../java/arq/cmdline/ModDatasetAssembler.java | 4 +
.../org/apache/jena/fuseki/cmd/FusekiCmd.java | 23 ++-
.../apache/jena/fuseki/server/FusekiInfo.java | 143 +++++++++++++++++++
.../jena/fuseki/server/FusekiInitialConfig.java | 61 ++++++++
.../apache/jena/fuseki/server/FusekiServer.java | 4 +-
.../fuseki/server/FusekiServerListener.java | 5 +-
.../jena/fuseki/server/ServerInitialConfig.java | 56 --------
.../java/org/apache/jena/fuseki/ServerCtl.java | 2 +-
8 files changed, 232 insertions(+), 66 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/b304bc4c/jena-cmds/src/main/java/arq/cmdline/ModDatasetAssembler.java
----------------------------------------------------------------------
diff --git a/jena-cmds/src/main/java/arq/cmdline/ModDatasetAssembler.java b/jena-cmds/src/main/java/arq/cmdline/ModDatasetAssembler.java
index 9c1ffa0..f5ead43 100644
--- a/jena-cmds/src/main/java/arq/cmdline/ModDatasetAssembler.java
+++ b/jena-cmds/src/main/java/arq/cmdline/ModDatasetAssembler.java
@@ -62,4 +62,8 @@ public class ModDatasetAssembler extends ModDataset
public void processArgs(CmdArgModule cmdLine) {
modAssembler.processArgs(cmdLine);
}
+
+ public String getAssemblerFile() {
+ return modAssembler.getAssemblerFile() ;
+ }
}
http://git-wip-us.apache.org/repos/asf/jena/blob/b304bc4c/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java
index 565a8f6..24a3646 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java
@@ -36,7 +36,7 @@ import org.apache.jena.fuseki.jetty.JettyServerConfig ;
import org.apache.jena.fuseki.server.FusekiEnv ;
import org.apache.jena.fuseki.server.FusekiServer ;
import org.apache.jena.fuseki.server.FusekiServerListener ;
-import org.apache.jena.fuseki.server.ServerInitialConfig ;
+import org.apache.jena.fuseki.server.FusekiInitialConfig ;
import org.apache.jena.query.ARQ ;
import org.apache.jena.query.Dataset ;
import org.apache.jena.riot.Lang ;
@@ -112,7 +112,7 @@ public class FusekiCmd {
jettyServerConfig.verboseLogging = false ;
}
- private final ServerInitialConfig cmdLineConfig = new ServerInitialConfig() ;
+ private final FusekiInitialConfig cmdLineConfig = new FusekiInitialConfig() ;
public FusekiCmdInner(String... argv) {
super(argv) ;
@@ -164,14 +164,18 @@ public class FusekiCmd {
jettyServerConfig.verboseLogging = true ;
// Output is still at level INFO (currently)
}
+ cmdLineConfig.quiet = super.isQuiet();
+ cmdLineConfig.verbose = super.isVerbose();
// Any final tinkering with FUSEKI_HOME and FUSEKI_BASE, e.g. arguments like --home, --base, then ....
FusekiEnv.resetEnvironment() ;
Logger log = Fuseki.serverLog ;
- if ( contains(argFusekiConfig) )
+ if ( contains(argFusekiConfig) ) {
cmdLineConfig.fusekiCmdLineConfigFile = getValue(argFusekiConfig) ;
+ cmdLineConfig.datasetDescription = "Configuration: "+cmdLineConfig.fusekiCmdLineConfigFile;
+ }
ArgDecl assemblerDescDecl = new ArgDecl(ArgDecl.HasValue, "desc", "dataset") ;
@@ -225,6 +229,7 @@ public class FusekiCmd {
if ( contains(argMem) ) {
log.info("Dataset: in-memory") ;
+ cmdLineConfig.datasetDescription = "in-memory";
// Only one setup should be called by the test above but to be safe
// and in case of future changes, clear the configuration.
cmdLineConfig.reset();
@@ -236,9 +241,12 @@ public class FusekiCmd {
if ( contains(argFile) ) {
String filename = getValue(argFile) ;
log.info("Dataset: in-memory: load file: " + filename) ;
+ String pathname = filename;
+ if ( filename.startsWith("file:") )
+ pathname = filename.substring("file:".length());
if ( !FileOps.exists(filename) )
throw new CmdException("File not found: " + filename) ;
-
+ cmdLineConfig.datasetDescription = "file: "+filename;
// Directly populate the dataset.
cmdLineConfig.reset();
cmdLineConfig.dsg = DatasetGraphFactory.createTxnMem() ;
@@ -255,6 +263,7 @@ public class FusekiCmd {
cmdLineConfig.params.put(Template.DIR, Names.memName) ;
// Always allow.
cmdLineConfig.allowUpdate = true ;
+ cmdLineConfig.datasetDescription = "TDB dataset (in-memory)";
}
if ( contains(argTDB) ) {
@@ -262,11 +271,13 @@ public class FusekiCmd {
cmdLineConfig.argTemplateFile = Template.templateTDBDirFN ;
String dir = getValue(argTDB) ;
cmdLineConfig.params.put(Template.DIR, dir) ;
+ cmdLineConfig.datasetDescription = "TDB dataset: "+dir;
}
// Otherwise
if ( contains(assemblerDescDecl) ) {
log.info("Dataset from assembler") ;
+ cmdLineConfig.datasetDescription = "Assembler: "+ modDataset.getAssemblerFile();
// Need to add service details.
Dataset ds = modDataset.createDataset() ;
//cmdLineDataset.dsg = ds.asDatasetGraph() ;
@@ -347,10 +358,12 @@ public class FusekiCmd {
}
/** Configure and run a Fuseki server - this function does not return except for error starting up*/
- public static void runFuseki(ServerInitialConfig serverConfig, JettyServerConfig jettyConfig) {
+ public static void runFuseki(FusekiInitialConfig serverConfig, JettyServerConfig jettyConfig) {
FusekiServerListener.initialSetup = serverConfig ;
JettyFuseki.initializeServer(jettyConfig) ;
JettyFuseki.instance.start() ;
JettyFuseki.instance.join() ;
}
+
+
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/b304bc4c/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiInfo.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiInfo.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiInfo.java
new file mode 100644
index 0000000..1754258
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiInfo.java
@@ -0,0 +1,143 @@
+package org.apache.jena.fuseki.server;
+
+import java.util.ArrayList ;
+import java.util.LinkedHashMap ;
+import java.util.List ;
+import java.util.Map ;
+import java.util.function.Function;
+
+import org.apache.jena.atlas.logging.FmtLog;
+import org.apache.jena.fuseki.Fuseki;
+import org.slf4j.Logger;
+
+public class FusekiInfo {
+
+ public static void info(FusekiInitialConfig serverConfig, DataAccessPointRegistry registry) {
+ if ( ! serverConfig.verbose )
+ return;
+ if ( serverConfig.quiet )
+ return;
+
+ Logger log = Fuseki.serverLog;
+ FmtLog.info(log, "Apache Jena Fuseki");
+
+ // Dataset -> Endpoints
+ Map<String, List<String>> z = description(registry);
+
+// if ( serverConfig.empty ) {
+// FmtLog.info(log, "No SPARQL datasets services");
+// } else {
+// if ( serverConfig.datasetPath == null && serverConfig.serverConfig == null )
+// log.error("No dataset path nor server configuration file");
+// }
+
+ if ( serverConfig.datasetPath != null ) {
+ if ( z.size() != 1 )
+ log.error("Expected only one dataset");
+ List<String> endpoints = z.get(serverConfig.datasetPath);
+ FmtLog.info(log, "Dataset Type = %s", serverConfig.datasetDescription);
+ FmtLog.info(log, "Path = %s; Services = %s", serverConfig.datasetPath, endpoints);
+ }
+ if ( serverConfig.fusekiServerConfigFile != null ) {
+ // May be many datasets and services.
+ FmtLog.info(log, "Configuration file %s", serverConfig.fusekiServerConfigFile);
+ z.forEach((name, endpoints)->{
+ FmtLog.info(log, "Path = %s; Services = %s", name, endpoints);
+ });
+ }
+ FusekiInfo.logDetails(log);
+ }
+
+ private static Map<String, List<String>> description(DataAccessPointRegistry reg) {
+ Map<String, List<String>> desc = new LinkedHashMap<>();
+ reg.forEach((ds,dap)->{
+ List<String> endpoints = new ArrayList<>();
+ desc.put(ds, endpoints);
+ DataService dSrv = dap.getDataService();
+ dSrv.getOperations().forEach((opName)->{
+ dSrv.getOperation(opName).forEach(ep-> {
+ String x = ep.getEndpoint();
+ if ( x.isEmpty() )
+ x = "quads";
+ endpoints.add(x);
+ });
+ });
+ });
+ return desc;
+ }
+
+ public static void logDetails(Logger log) {
+ long maxMem = Runtime.getRuntime().maxMemory();
+ long totalMem = Runtime.getRuntime().totalMemory();
+ long freeMem = Runtime.getRuntime().freeMemory();
+ long usedMem = totalMem - freeMem;
+ Function<Long, String> f = FusekiInfo::strNum2;
+ //FmtLog.info(log, "Apache Jena %s", Jena.VERSION);
+ FmtLog.info(log, " Fuseki: %s", Fuseki.VERSION);
+ FmtLog.info(log, " Java: %s", System.getProperty("java.version"));
+ //FmtLog.info(log, "Memory: max=%s total=%s used=%s free=%s", f.apply(maxMem), f.apply(totalMem), f.apply(usedMem), f.apply(freeMem));
+ FmtLog.info(log, " Memory: max=%s", f.apply(maxMem));
+ FmtLog.info(log, " OS: %s %s %s", System.getProperty("os.name"), System.getProperty("os.version"), System.getProperty("os.arch"));
+ FmtLog.info(log, " Java %s", System.getProperty("java.runtime.version"));
+ }
+
+ public static void logDetailsVerbose(Logger log) {
+ logDetails(log);
+ logOne(log, "java.vendor");
+ logOne(log, "java.home");
+ logOne(log, "java.runtime.version");
+ logOne(log, "java.runtime.name");
+ //logOne(log, "java.endorsed.dirs");
+ logOne(log, "user.language");
+ logOne(log, "user.timezone");
+ logOne(log, "user.country");
+ logOne(log, "user.dir");
+ //logOne(log, "file.encoding");
+ }
+
+ private static void logOne(Logger log, String property) {
+ FmtLog.info(log, " %-20s = %s", property, System.getProperty(property));
+ }
+
+ /** Create a human-friendly string for a number based on Kilo/Mega/Giga/Tera (powers of 2) */
+ public static String strNumMixed(long x) {
+ // https://en.wikipedia.org/wiki/Kibibyte
+ if ( x < 1024 )
+ return Long.toString(x);
+ if ( x < 1024*1024 )
+ return String.format("%.1fK", x/1024.0);
+ if ( x < 1024*1024*1024 )
+ return String.format("%.1fM", x/(1024.0*1024));
+ if ( x < 1024L*1024*1024*1024 )
+ return String.format("%.1fG", x/(1024.0*1024*1024));
+ return String.format("%.1fT", x/(1024.0*1024*1024*1024));
+ }
+
+
+ /** Create a human-friendly string for a number based on Kilo/Mega/Giga/Tera (powers of 10) */
+ public static String strNum10(long x) {
+ if ( x < 1_000 )
+ return Long.toString(x);
+ if ( x < 1_000_000 )
+ return String.format("%.1fK", x/1000.0);
+ if ( x < 1_000_000_000 )
+ return String.format("%.1fM", x/(1000.0*1000));
+ if ( x < 1_000_000_000_000L )
+ return String.format("%.1fG", x/(1000.0*1000*1000));
+ return String.format("%.1fT", x/(1000.0*1000*1000*1000));
+ }
+
+ /** Create a human-friendly string for a number based on Kibi/Mebi/Gibi/Tebi (powers of 2) */
+ public static String strNum2(long x) {
+ // https://en.wikipedia.org/wiki/Kibibyte
+ if ( x < 1024 )
+ return Long.toString(x);
+ if ( x < 1024*1024 )
+ return String.format("%.1f KiB", x/1024.0);
+ if ( x < 1024*1024*1024 )
+ return String.format("%.1f MiB", x/(1024.0*1024));
+ if ( x < 1024L*1024*1024*1024 )
+ return String.format("%.1f GiB", x/(1024.0*1024*1024));
+ return String.format("%.1fTiB", x/(1024.0*1024*1024*1024));
+ }
+}
http://git-wip-us.apache.org/repos/asf/jena/blob/b304bc4c/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiInitialConfig.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiInitialConfig.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiInitialConfig.java
new file mode 100644
index 0000000..8e66502
--- /dev/null
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiInitialConfig.java
@@ -0,0 +1,61 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jena.fuseki.server;
+
+import java.util.HashMap ;
+import java.util.Map ;
+
+import org.apache.jena.sparql.core.DatasetGraph ;
+
+/** Dataset setup (command line, config file) for a dataset (or several if config file) */
+public class FusekiInitialConfig {
+ public boolean quiet = false ;
+ public boolean verbose = false ;
+
+ // Priority order : --conf, templated
+ // through the command line processing should not allow --conf and a templated /dataset.
+
+ // Label for dataset setup (command line).
+ public String datasetDescription = null ;
+ // Either this ... command line ...
+ public String argTemplateFile = null ; // Command list args --mem, --loc, --memtdb
+ public String datasetPath = null ; // Dataset name on the command line.
+ public boolean allowUpdate = false ; // Command line --update.
+ // Special case - prebuilt dataset. Uses datasetPath.
+ public DatasetGraph dsg = null ; // Embedded or command line --file)
+
+ // Or configuration file from command line
+ public String fusekiCmdLineConfigFile = null ; // Command line --conf.
+ // Or configuration from run area (lowest priority)
+ public String fusekiServerConfigFile = null ; // "run" area
+
+ // Additional information.
+ public Map<String,String> params = new HashMap<>() ;
+
+ public FusekiInitialConfig() {}
+
+ public void reset() {
+ argTemplateFile = null ;
+ datasetPath = null ;
+ allowUpdate = false ;
+ dsg = null ;
+ fusekiCmdLineConfigFile = null ; // Command line --conf.
+ fusekiServerConfigFile = null ;
+ }
+}
http://git-wip-us.apache.org/repos/asf/jena/blob/b304bc4c/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServer.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServer.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServer.java
index b9a12ab..1697f8f 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServer.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServer.java
@@ -198,7 +198,7 @@ public class FusekiServer
}
}
- public static void initializeDataAccessPoints(DataAccessPointRegistry registry, ServerInitialConfig initialSetup, String configDir) {
+ public static void initializeDataAccessPoints(DataAccessPointRegistry registry, FusekiInitialConfig initialSetup, String configDir) {
List<DataAccessPoint> configFileDBs = initServerConfiguration(initialSetup) ;
List<DataAccessPoint> directoryDBs = FusekiConfig.readConfigurationDirectory(configDir) ;
List<DataAccessPoint> systemDBs = FusekiConfig.readSystemDatabase(SystemState.getDataset()) ;
@@ -219,7 +219,7 @@ public class FusekiServer
}
}
- private static List<DataAccessPoint> initServerConfiguration(ServerInitialConfig params) {
+ private static List<DataAccessPoint> initServerConfiguration(FusekiInitialConfig params) {
// Has a side effect of global context setting
// when processing a config file.
// Compatibility.
http://git-wip-us.apache.org/repos/asf/jena/blob/b304bc4c/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServerListener.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServerListener.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServerListener.java
index 21f742b..10e7ba3 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServerListener.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServerListener.java
@@ -39,7 +39,7 @@ public class FusekiServerListener implements ServletContextListener {
public FusekiServerListener() { }
- public static ServerInitialConfig initialSetup = null ;
+ public static FusekiInitialConfig initialSetup = null ;
private boolean initialized = false ;
@@ -79,7 +79,7 @@ public class FusekiServerListener implements ServletContextListener {
// The command line code sets initialSetup.
// In a non-commandline startup, initialSetup is null.
if ( initialSetup == null ) {
- initialSetup = new ServerInitialConfig() ;
+ initialSetup = new FusekiInitialConfig() ;
String cfg = FusekiEnv.FUSEKI_BASE.resolve(FusekiServer.DFT_CONFIG).toAbsolutePath().toString() ;
initialSetup.fusekiServerConfigFile = cfg ;
}
@@ -95,6 +95,7 @@ public class FusekiServerListener implements ServletContextListener {
Fuseki.serverLog.error("Exception in initialization: {}", th.getMessage()) ;
throw th ;
}
+ FusekiInfo.info(initialSetup, registry);
}
}
http://git-wip-us.apache.org/repos/asf/jena/blob/b304bc4c/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/ServerInitialConfig.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/ServerInitialConfig.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/ServerInitialConfig.java
deleted file mode 100644
index ea2c910..0000000
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/ServerInitialConfig.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.jena.fuseki.server;
-
-import java.util.HashMap ;
-import java.util.Map ;
-
-import org.apache.jena.sparql.core.DatasetGraph ;
-
-/** Dataset setup (command line, config file) for a dataset (or several if config file) */
-public class ServerInitialConfig {
- // Priority order : --conf, templated
- // through the command line processing should not allow --conf and a templated /dataset.
-
- // Either this ... command line ...
- public String argTemplateFile = null ; // Command list args --mem, --loc, --memtdb
- public String datasetPath = null ; // Dataset name on the command line.
- public boolean allowUpdate = false ; // Command line --update.
- // Special case - prebuilt dataset. Uses datasetPath.
- public DatasetGraph dsg = null ; // Embedded or command line --file)
-
- // Or configuration file from command line
- public String fusekiCmdLineConfigFile = null ; // Command line --conf.
- // Or configuration from run area (lowest priority)
- public String fusekiServerConfigFile = null ; // "run" area
-
- // Additional information.
- public Map<String,String> params = new HashMap<>() ;
-
- public ServerInitialConfig() {}
-
- public void reset() {
- argTemplateFile = null ;
- datasetPath = null ;
- allowUpdate = false ;
- dsg = null ;
- fusekiCmdLineConfigFile = null ; // Command line --conf.
- fusekiServerConfigFile = null ;
- }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/b304bc4c/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/ServerCtl.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/ServerCtl.java b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/ServerCtl.java
index cc8870d..ce96867 100644
--- a/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/ServerCtl.java
+++ b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/ServerCtl.java
@@ -229,7 +229,7 @@ public class ServerCtl {
SystemState.location = Location.mem() ;
SystemState.init$() ;
- ServerInitialConfig params = new ServerInitialConfig() ;
+ FusekiInitialConfig params = new FusekiInitialConfig() ;
dsgTesting = DatasetGraphFactory.createTxnMem() ;
params.dsg = dsgTesting ;
params.datasetPath = datasetPath ;
[3/5] jena git commit: Add Java version (for --verbose)
Posted by an...@apache.org.
Add Java version (for --verbose)
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/40e04703
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/40e04703
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/40e04703
Branch: refs/heads/master
Commit: 40e047031edfa9a001cc80575354584529dc8014
Parents: 4c76f50
Author: Andy Seaborne <an...@apache.org>
Authored: Sun Jun 18 18:43:31 2017 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Sun Jun 18 18:43:31 2017 +0100
----------------------------------------------------------------------
.../src/main/java/org/apache/jena/fuseki/server/FusekiInfo.java | 1 -
1 file changed, 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/40e04703/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiInfo.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiInfo.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiInfo.java
index 1754258..bb67529 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiInfo.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiInfo.java
@@ -78,7 +78,6 @@ public class FusekiInfo {
//FmtLog.info(log, "Memory: max=%s total=%s used=%s free=%s", f.apply(maxMem), f.apply(totalMem), f.apply(usedMem), f.apply(freeMem));
FmtLog.info(log, " Memory: max=%s", f.apply(maxMem));
FmtLog.info(log, " OS: %s %s %s", System.getProperty("os.name"), System.getProperty("os.version"), System.getProperty("os.arch"));
- FmtLog.info(log, " Java %s", System.getProperty("java.runtime.version"));
}
public static void logDetailsVerbose(Logger log) {
[4/5] jena git commit: Allow for read-only TDB dataset setup from the
command line.
Posted by an...@apache.org.
Allow for read-only TDB dataset setup from the command line.
Maintain compatibility.
--conf is the better way to do it.
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/b4e44a9d
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/b4e44a9d
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/b4e44a9d
Branch: refs/heads/master
Commit: b4e44a9dfd11dbd5073e185581fc78a059bea628
Parents: 40e0470
Author: Andy Seaborne <an...@apache.org>
Authored: Sun Jun 18 18:44:43 2017 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Sun Jun 18 18:44:43 2017 +0100
----------------------------------------------------------------------
.../src/main/java/org/apache/jena/fuseki/build/Template.java | 1 +
.../src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/b4e44a9d/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/Template.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/Template.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/Template.java
index 27568d1..093b644 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/Template.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/Template.java
@@ -33,6 +33,7 @@ public class Template
public static final String templateTDBFN = templateDir+"/config-tdb" ;
public static final String templateTDBMemFN = templateDir+"/config-tdb-mem" ;
public static final String templateTDBDirFN = templateDir+"/config-tdb-dir" ;
+ public static final String templateTDBDirReadFN = templateDir+"/config-tdb-dir-read-only" ;
public static final String templateServiceFN = templateDir+"/config-service" ; // Dummy used by dataset-less service.
public static final String templateMemFN_1 = templateDir+"/config-mem-txn" ;
http://git-wip-us.apache.org/repos/asf/jena/blob/b4e44a9d/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java
index 24a3646..7277d50 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java
@@ -268,7 +268,10 @@ public class FusekiCmd {
if ( contains(argTDB) ) {
cmdLineConfig.reset();
- cmdLineConfig.argTemplateFile = Template.templateTDBDirFN ;
+// cmdLineConfig.argTemplateFile =
+// cmdLineConfig.allowUpdate ? Template.templateTDBDirFN : Template.templateTDBDirReadFN;
+ // For a long time, "--update" did not apply here and so for compatibility ...
+ cmdLineConfig.argTemplateFile = Template.templateTDBDirFN;
String dir = getValue(argTDB) ;
cmdLineConfig.params.put(Template.DIR, dir) ;
cmdLineConfig.datasetDescription = "TDB dataset: "+dir;
[5/5] jena git commit: ASF Header
Posted by an...@apache.org.
ASF Header
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/887def84
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/887def84
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/887def84
Branch: refs/heads/master
Commit: 887def848a2712c8e6ca337e275df91ba7e8c9ab
Parents: b4e44a9
Author: Andy Seaborne <an...@apache.org>
Authored: Sun Jun 18 18:52:06 2017 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Sun Jun 18 18:52:06 2017 +0100
----------------------------------------------------------------------
.../org/apache/jena/fuseki/server/FusekiInfo.java | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/887def84/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiInfo.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiInfo.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiInfo.java
index bb67529..754f358 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiInfo.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiInfo.java
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package org.apache.jena.fuseki.server;
import java.util.ArrayList ;
[2/5] jena git commit: Use full name.
Posted by an...@apache.org.
Use full name.
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/4c76f508
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/4c76f508
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/4c76f508
Branch: refs/heads/master
Commit: 4c76f508a11eaba270b678f596ab874fe9733c0e
Parents: b304bc4
Author: Andy Seaborne <an...@apache.org>
Authored: Sun Jun 18 18:43:03 2017 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Sun Jun 18 18:43:03 2017 +0100
----------------------------------------------------------------------
.../src/main/java/org/apache/jena/fuseki/Fuseki.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/4c76f508/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/Fuseki.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/Fuseki.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/Fuseki.java
index 2139539..01f6a71 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/Fuseki.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/Fuseki.java
@@ -82,8 +82,8 @@ public class Fuseki {
return m ;
}
- /** The name of the Fuseki server. Set to the string <code>Fuseki</code> by default. */
- static public final String NAME = "Fuseki" ;
+ /** The name of the Fuseki server.*/
+ static public final String NAME = "Apache Jena Fuseki" ;
/** Version of this Fuseki instance */
static public final String VERSION = metadata.get(PATH + ".version", "development") ;