final boolean vertexProgramExists = newConfiguration.get(VertexProgram.VERTEX_PROGRAM, null) != null; if (vertexProgramExists) { newConfiguration.set(Constants.GREMLIN_HADOOP_GRAPH_READER, InputOutputHelper.getInputFormat((Class) newConfiguration.getClass(Constants.GREMLIN_HADOOP_GRAPH_WRITER, OutputFormat.class)).getCanonicalName()); newConfiguration.unset(Constants.GREMLIN_HADOOP_GRAPH_FILTER);
public static HadoopGraph getOutputGraph(final Configuration configuration, final GraphComputer.ResultGraph resultGraph, final GraphComputer.Persist persist) { final HadoopConfiguration hadoopConfiguration = new HadoopConfiguration(configuration); final BaseConfiguration newConfiguration = new BaseConfiguration(); newConfiguration.copy(org.apache.tinkerpop.gremlin.hadoop.structure.io.InputOutputHelper.getOutputGraph(configuration, resultGraph, persist).configuration()); if (resultGraph.equals(GraphComputer.ResultGraph.NEW) && hadoopConfiguration.containsKey(Constants.GREMLIN_HADOOP_GRAPH_WRITER)) { if (null != InputOutputHelper.getInputFormat(hadoopConfiguration.getGraphWriter())) newConfiguration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_READER, InputOutputHelper.getInputFormat(hadoopConfiguration.getGraphWriter()).getCanonicalName()); } return HadoopGraph.open(newConfiguration); } }
public static HadoopGraph getOutputGraph(final Configuration configuration, final GraphComputer.ResultGraph resultGraph, final GraphComputer.Persist persist) { final HadoopConfiguration hadoopConfiguration = new HadoopConfiguration(configuration); final BaseConfiguration newConfiguration = new BaseConfiguration(); newConfiguration.copy(hadoopConfiguration); if (resultGraph.equals(GraphComputer.ResultGraph.NEW)) { newConfiguration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, hadoopConfiguration.getOutputLocation()); if (hadoopConfiguration.containsKey(Constants.GREMLIN_HADOOP_GRAPH_WRITER)) if (null != InputOutputHelper.getInputFormat(hadoopConfiguration.getGraphWriter())) newConfiguration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_READER, InputOutputHelper.getInputFormat(hadoopConfiguration.getGraphWriter()).getCanonicalName()); newConfiguration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_READER_HAS_EDGES, persist.equals(GraphComputer.Persist.EDGES)); } newConfiguration.setProperty(Constants.GREMLIN_HADOOP_OUTPUT_LOCATION, hadoopConfiguration.getOutputLocation() + "_"); return HadoopGraph.open(newConfiguration); } }
public static HadoopGraph getOutputGraph(final Configuration configuration, final GraphComputer.ResultGraph resultGraph, final GraphComputer.Persist persist) { final HadoopConfiguration hadoopConfiguration = new HadoopConfiguration(configuration); final BaseConfiguration newConfiguration = new BaseConfiguration(); newConfiguration.copy(org.apache.tinkerpop.gremlin.hadoop.structure.io.InputOutputHelper.getOutputGraph(configuration, resultGraph, persist).configuration()); if (resultGraph.equals(GraphComputer.ResultGraph.NEW) && hadoopConfiguration.containsKey(Constants.GREMLIN_HADOOP_GRAPH_WRITER)) { if (null != InputOutputHelper.getInputFormat(hadoopConfiguration.getGraphWriter())) newConfiguration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_READER, InputOutputHelper.getInputFormat(hadoopConfiguration.getGraphWriter()).getCanonicalName()); } return HadoopGraph.open(newConfiguration); } }
final boolean vertexProgramExists = newConfiguration.get(VertexProgram.VERTEX_PROGRAM, null) != null; if (vertexProgramExists) { newConfiguration.set(Constants.GREMLIN_HADOOP_GRAPH_READER, InputOutputHelper.getInputFormat((Class) newConfiguration.getClass(Constants.GREMLIN_HADOOP_GRAPH_WRITER, OutputFormat.class)).getCanonicalName()); newConfiguration.unset(Constants.GREMLIN_HADOOP_GRAPH_FILTER);
public static HadoopGraph getOutputGraph(final Configuration configuration, final GraphComputer.ResultGraph resultGraph, final GraphComputer.Persist persist) { final HadoopConfiguration hadoopConfiguration = new HadoopConfiguration(configuration); final BaseConfiguration newConfiguration = new BaseConfiguration(); newConfiguration.copy(hadoopConfiguration); if (resultGraph.equals(GraphComputer.ResultGraph.NEW)) { newConfiguration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, hadoopConfiguration.getOutputLocation()); if (hadoopConfiguration.containsKey(Constants.GREMLIN_HADOOP_GRAPH_WRITER)) if (null != InputOutputHelper.getInputFormat(hadoopConfiguration.getGraphWriter())) newConfiguration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_READER, InputOutputHelper.getInputFormat(hadoopConfiguration.getGraphWriter()).getCanonicalName()); newConfiguration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_READER_HAS_EDGES, persist.equals(GraphComputer.Persist.EDGES)); } newConfiguration.setProperty(Constants.GREMLIN_HADOOP_OUTPUT_LOCATION, hadoopConfiguration.getOutputLocation() + "_"); return HadoopGraph.open(newConfiguration); } }