Repository: tinkerpop Updated Branches: refs/heads/tp33 2cc921954 -> 9f0dbd850
ScriptEngine cache should be static Scripts won't share the same cache without this change and will force uncessary recompiles that are expensive CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/9f0dbd85 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/9f0dbd85 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/9f0dbd85 Branch: refs/heads/tp33 Commit: 9f0dbd85015804999be0cce3996c6c30ab041ccb Parents: 2cc9219 Author: Stephen Mallette <[email protected]> Authored: Tue Sep 18 19:22:10 2018 -0400 Committer: Stephen Mallette <[email protected]> Committed: Tue Sep 18 19:22:10 2018 -0400 ---------------------------------------------------------------------- .../hadoop/structure/io/script/ScriptRecordReader.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9f0dbd85/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/script/ScriptRecordReader.java ---------------------------------------------------------------------- diff --git a/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/script/ScriptRecordReader.java b/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/script/ScriptRecordReader.java index 16bc057..0ea3d84 100644 --- a/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/script/ScriptRecordReader.java +++ b/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/script/ScriptRecordReader.java @@ -56,14 +56,14 @@ import java.util.Optional; */ public final class ScriptRecordReader extends RecordReader<NullWritable, VertexWritable> { - protected final static String SCRIPT_FILE = "gremlin.hadoop.scriptInputFormat.script"; - protected final static String SCRIPT_ENGINE = "gremlin.hadoop.scriptInputFormat.scriptEngine"; - private final static String GRAPH = "graph"; - private final static String LINE = "line"; - private final static String READ_CALL = "parse(" + LINE + ")"; + protected static final String SCRIPT_FILE = "gremlin.hadoop.scriptInputFormat.script"; + protected static final String SCRIPT_ENGINE = "gremlin.hadoop.scriptInputFormat.scriptEngine"; + private static final String GRAPH = "graph"; + private static final String LINE = "line"; + private static final String READ_CALL = "parse(" + LINE + ")"; private final VertexWritable vertexWritable = new VertexWritable(); private final LineRecordReader lineRecordReader; - private final GremlinScriptEngineManager manager = new CachedGremlinScriptEngineManager(); + private static final GremlinScriptEngineManager manager = new CachedGremlinScriptEngineManager(); private ScriptEngine engine; private CompiledScript script;
