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/24 21:21:26 UTC
tinkerpop git commit: if the System.getProperty() has a shim-service
set,
then it is also set as a DRIVER_JAVA_OPTIONS and an EXECUTOR_JAVA_OPTIONS in
SparkGraphComputer (this is necessary for Spark 2.0). Also,
some is.testing class registrations are now
Repository: tinkerpop
Updated Branches:
refs/heads/TINKERPOP-1389 73dac20a4 -> 7bf88ebe4
if the System.getProperty() has a shim-service set, then it is also set as a DRIVER_JAVA_OPTIONS and an EXECUTOR_JAVA_OPTIONS in SparkGraphComputer (this is necessary for Spark 2.0). Also, some is.testing class registrations are now also needed outside of testing -- Spark 2.0 anonomaly.
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/7bf88ebe
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/7bf88ebe
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/7bf88ebe
Branch: refs/heads/TINKERPOP-1389
Commit: 7bf88ebe4a0a442fb822dd378dec4eb4f15408a2
Parents: 73dac20
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Mon Oct 24 15:21:23 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Mon Oct 24 15:21:23 2016 -0600
----------------------------------------------------------------------
.../spark/process/computer/SparkGraphComputer.java | 8 ++++++++
.../spark/structure/io/gryo/GryoRegistrator.java | 12 +++++-------
2 files changed, 13 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7bf88ebe/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 40598c0..36618a1 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
@@ -70,6 +70,7 @@ import org.apache.tinkerpop.gremlin.spark.structure.io.SparkContextStorage;
import org.apache.tinkerpop.gremlin.spark.structure.io.gryo.GryoSerializer;
import org.apache.tinkerpop.gremlin.structure.Direction;
import org.apache.tinkerpop.gremlin.structure.io.Storage;
+import org.apache.tinkerpop.gremlin.structure.io.gryo.kryoshim.KryoShimServiceLoader;
import java.io.File;
import java.io.IOException;
@@ -105,6 +106,13 @@ public final class SparkGraphComputer extends AbstractHadoopGraphComputer {
super(hadoopGraph);
this.sparkConfiguration = new HadoopConfiguration();
ConfigurationUtils.copy(this.hadoopGraph.configuration(), this.sparkConfiguration);
+ if (null != System.getProperty(KryoShimServiceLoader.KRYO_SHIM_SERVICE, null)) {
+ final String shimService = System.getProperty(KryoShimServiceLoader.KRYO_SHIM_SERVICE);
+ this.sparkConfiguration.setProperty(SparkLauncher.EXECUTOR_EXTRA_JAVA_OPTIONS,
+ (this.sparkConfiguration.getString(SparkLauncher.EXECUTOR_EXTRA_JAVA_OPTIONS, "") + " -D" + KryoShimServiceLoader.KRYO_SHIM_SERVICE + "=" + shimService).trim());
+ this.sparkConfiguration.setProperty(SparkLauncher.DRIVER_EXTRA_JAVA_OPTIONS,
+ (this.sparkConfiguration.getString(SparkLauncher.DRIVER_EXTRA_JAVA_OPTIONS, "") + " -D" + KryoShimServiceLoader.KRYO_SHIM_SERVICE + "=" + shimService).trim());
+ }
}
@Override
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7bf88ebe/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/io/gryo/GryoRegistrator.java
----------------------------------------------------------------------
diff --git a/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/io/gryo/GryoRegistrator.java b/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/io/gryo/GryoRegistrator.java
index ffd731a..9495375 100644
--- a/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/io/gryo/GryoRegistrator.java
+++ b/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/io/gryo/GryoRegistrator.java
@@ -178,13 +178,11 @@ public class GryoRegistrator implements KryoRegistrator {
// duplication, but it would be a bit cumbersome to do so without disturbing
// the ordering of the existing entries in that constructor, since not all
// of the entries are for TinkerPop (and the ordering is significant).
- if (Boolean.valueOf(System.getProperty("is.testing", "false"))) {
- try {
- m.put(Class.forName("scala.reflect.ClassTag$$anon$1"), new JavaSerializer());
- m.put(Class.forName("scala.reflect.ManifestFactory$$anon$1"), new JavaSerializer());
- } catch (final ClassNotFoundException e) {
- throw new IllegalStateException(e.getMessage(), e);
- }
+ try {
+ m.put(Class.forName("scala.reflect.ClassTag$$anon$1"), new JavaSerializer());
+ m.put(Class.forName("scala.reflect.ManifestFactory$$anon$1"), new JavaSerializer());
+ } catch (final ClassNotFoundException e) {
+ throw new IllegalStateException(e.getMessage(), e);
}
m.put(WrappedArray.ofRef.class, null);
m.put(MessagePayload.class, null);