You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2016/10/26 14:04:42 UTC
tinkerpop git commit: using tinkerpop as the prefix for System
property configurations. Tweaked the KryoShimServiceLoader's logging
information so its easier to see whats going on --- doing cluster testing.
Repository: tinkerpop
Updated Branches:
refs/heads/TINKERPOP-1389 762678165 -> b3364a5fe
using tinkerpop as the prefix for System property configurations. Tweaked the KryoShimServiceLoader's logging information so its easier to see whats going on --- doing cluster testing.
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/b3364a5f
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/b3364a5f
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/b3364a5f
Branch: refs/heads/TINKERPOP-1389
Commit: b3364a5fe860f4ca6b5d644291f84b62630c0ff8
Parents: 7626781
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Wed Oct 26 08:04:38 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Wed Oct 26 08:04:38 2016 -0600
----------------------------------------------------------------------
.../io/gryo/kryoshim/KryoShimServiceLoader.java | 21 +++++++++++---------
.../hadoop/structure/io/HadoopPools.java | 2 +-
.../process/computer/SparkGraphComputer.java | 2 +-
3 files changed, 14 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b3364a5f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/kryoshim/KryoShimServiceLoader.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/kryoshim/KryoShimServiceLoader.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/kryoshim/KryoShimServiceLoader.java
index 7b67328..0051204 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/kryoshim/KryoShimServiceLoader.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/kryoshim/KryoShimServiceLoader.java
@@ -67,14 +67,14 @@ public class KryoShimServiceLoader {
* before selecting a new service to return
* @return the shim service
*/
- public static KryoShimService load(final boolean forceReload) {
+ private static KryoShimService load(final boolean forceReload) {
// if the service is loaded and doesn't need reloading, simply return in
if (null != cachedShimService && !forceReload)
return cachedShimService;
// if the configuration is null, try and load the configuration from System.properties
if (null == configuration)
- configuration = SystemUtil.getSystemPropertiesConfiguration("gremlin", true);
+ configuration = SystemUtil.getSystemPropertiesConfiguration("tinkerpop", true);
// get all of the shim services
final ArrayList<KryoShimService> services = new ArrayList<>();
@@ -89,9 +89,10 @@ public class KryoShimServiceLoader {
if (configuration.containsKey(KRYO_SHIM_SERVICE)) {
for (final KryoShimService kss : services) {
if (kss.getClass().getCanonicalName().equals(configuration.getString(KRYO_SHIM_SERVICE))) {
- log.info("Set {} provider to {} ({}) from system property {}={}",
- KryoShimService.class.getSimpleName(), kss, kss.getClass(),
- KRYO_SHIM_SERVICE, configuration.getString(KRYO_SHIM_SERVICE));
+ log.info("Set KryoShimService to {} because of configuration {}={}",
+ kss.getClass().getSimpleName(),
+ KRYO_SHIM_SERVICE,
+ configuration.getString(KRYO_SHIM_SERVICE));
cachedShimService = kss;
break;
}
@@ -99,12 +100,12 @@ public class KryoShimServiceLoader {
} else {
Collections.sort(services, KryoShimServiceComparator.INSTANCE);
for (final KryoShimService kss : services) {
- log.debug("Found Kryo shim service class {} (priority {})", kss.getClass(), kss.getPriority());
+ log.debug("Found KryoShimService: {} (priority {})", kss.getClass().getCanonicalName(), kss.getPriority());
}
if (0 != services.size()) {
cachedShimService = services.get(services.size() - 1);
- log.info("Set {} provider to {} ({}) because its priority value ({}) is the best available",
- KryoShimService.class.getSimpleName(), cachedShimService, cachedShimService.getClass(), cachedShimService.getPriority());
+ log.info("Set KryoShimService to {} because its priority value ({}) is the best available",
+ cachedShimService.getClass().getSimpleName(), cachedShimService.getPriority());
}
}
@@ -113,7 +114,9 @@ public class KryoShimServiceLoader {
throw new IllegalStateException("Unable to load KryoShimService");
// once the shim service is defined, configure it
- log.info("Configuring {} provider {} with user-provided configuration", KryoShimService.class.getSimpleName(), cachedShimService.getClass().getCanonicalName());
+ log.info("Configuring KryoShimService {} with following configuration: {}",
+ cachedShimService.getClass().getCanonicalName(),
+ ConfigurationUtils.toString(configuration));
cachedShimService.applyConfiguration(configuration);
return cachedShimService;
}
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b3364a5f/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/HadoopPools.java
----------------------------------------------------------------------
diff --git a/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/HadoopPools.java b/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/HadoopPools.java
index eb9a884..939887f 100644
--- a/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/HadoopPools.java
+++ b/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/HadoopPools.java
@@ -60,7 +60,7 @@ public final class HadoopPools {
public static GryoPool getGryoPool() {
if (!INITIALIZED) {
- final Configuration configuration = SystemUtil.getSystemPropertiesConfiguration("gremlin", true);
+ final Configuration configuration = SystemUtil.getSystemPropertiesConfiguration("tinkerpop", true);
HadoopGraph.LOGGER.warn("The " + HadoopPools.class.getSimpleName() + " has not been initialized, using system properties configuration: " + ConfigurationUtils.toString(configuration));
initialize(configuration);
}
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b3364a5f/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputer.java
----------------------------------------------------------------------
diff --git a/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputer.java b/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputer.java
index 81ebaaa..af158a0 100644
--- a/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputer.java
+++ b/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputer.java
@@ -118,7 +118,7 @@ public final class SparkGraphComputer extends AbstractHadoopGraphComputer {
final StringBuilder params = new StringBuilder();
this.sparkConfiguration.getKeys().forEachRemaining(key -> {
if (key.startsWith("gremlin") || key.startsWith("spark")) {
- params.append(" -D").append("gremlin.").append(key).append("=").append(this.sparkConfiguration.getProperty(key));
+ params.append(" -D").append("tinkerpop.").append(key).append("=").append(this.sparkConfiguration.getProperty(key));
}
});
if (params.length() > 0) {