| Chunk |
|---|
| Conflicting content |
|---|
package com.thinkaurelius.faunus; <<<<<<< HEAD import com.thinkaurelius.faunus.formats.graphson.GraphSONInputFormat; import com.thinkaurelius.faunus.formats.rexster.RexsterInputFormat; import com.thinkaurelius.faunus.formats.titan.TitanCassandraInputFormat; import com.thinkaurelius.faunus.mapreduce.MapReduceSequence; import com.thinkaurelius.faunus.mapreduce.MapSequence; import com.thinkaurelius.faunus.mapreduce.derivations.DirectionFilter; import com.thinkaurelius.faunus.mapreduce.derivations.EdgeFilter; import com.thinkaurelius.faunus.mapreduce.derivations.EdgePropertyFilter; import com.thinkaurelius.faunus.mapreduce.derivations.Identity; import com.thinkaurelius.faunus.mapreduce.derivations.LabelFilter; import com.thinkaurelius.faunus.mapreduce.derivations.LoopFilter; import com.thinkaurelius.faunus.mapreduce.derivations.Properties; import com.thinkaurelius.faunus.mapreduce.derivations.SideEffect; import com.thinkaurelius.faunus.mapreduce.derivations.Transpose; import com.thinkaurelius.faunus.mapreduce.derivations.Traverse; import com.thinkaurelius.faunus.mapreduce.derivations.VertexFilter; import com.thinkaurelius.faunus.mapreduce.derivations.VertexPropertyFilter; import com.thinkaurelius.faunus.mapreduce.statistics.AdjacentProperties; import com.thinkaurelius.faunus.mapreduce.statistics.Degree; import com.thinkaurelius.faunus.mapreduce.statistics.DegreeDistribution; import com.thinkaurelius.faunus.mapreduce.statistics.Distribution; import com.thinkaurelius.faunus.mapreduce.statistics.LabelDistribution; import com.thinkaurelius.faunus.mapreduce.statistics.PropertyDistribution; import com.thinkaurelius.faunus.mapreduce.statistics.PropertyValueDistribution; import com.thinkaurelius.faunus.mapreduce.statistics.SortedDegree; import com.thinkaurelius.faunus.mapreduce.statistics.Transform; ======= import com.thinkaurelius.faunus.mapreduce.FaunusRunner; >>>>>>> e72d6e302c9d1a49aee193bb5d252987ad79aa3f import com.tinkerpop.blueprints.Direction; import com.tinkerpop.blueprints.Edge; import com.tinkerpop.blueprints.Element; |
| Solution content |
|---|
package com.thinkaurelius.faunus; import com.thinkaurelius.faunus.mapreduce.FaunusRunner; import com.tinkerpop.blueprints.Direction; import com.tinkerpop.blueprints.Edge; import com.tinkerpop.blueprints.Element; |
| File |
|---|
| FaunusPipeline.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
} catch (IOException e) {
return this.groupCount(keyFunction, "{ it -> 1l}");
}
<<<<<<< HEAD
private void composeJobs() throws IOException {
if (this.jobs.size() == 0) {
return;
}
final FileSystem hdfs = FileSystem.get(this.getConf());
try {
final Job startJob = this.jobs.get(0);
startJob.setInputFormatClass(this.configuration.getGraphInputFormat());
// configure input location
if (this.configuration.getGraphInputFormat().equals(GraphSONInputFormat.class) || this.configuration.getGraphInputFormat().equals(SequenceFileInputFormat.class)) {
FileInputFormat.setInputPaths(startJob, this.configuration.getInputLocation());
} else if (this.configuration.getGraphInputFormat().equals(RexsterInputFormat.class)) {
} else if (this.configuration.getGraphInputFormat().equals(TitanCassandraInputFormat.class)) {
ConfigHelper.setInputColumnFamily(this.configuration, ConfigHelper.getInputKeyspace(this.configuration), "edgestore");
SlicePredicate predicate = new SlicePredicate();
SliceRange sliceRange = new SliceRange();
sliceRange.setStart(new byte[0]);
sliceRange.setFinish(new byte[0]);
predicate.setSlice_range(sliceRange);
ConfigHelper.setInputSlicePredicate(this.configuration, predicate);
} else
throw new IOException(this.configuration.getGraphInputFormat().getName() + " is not a supported input format");
if (this.jobs.size() > 1) {
final Path path = new Path(UUID.randomUUID().toString());
FileOutputFormat.setOutputPath(startJob, path);
this.intermediateFiles.add(path);
startJob.setOutputFormatClass(INTERMEDIATE_OUTPUT_FORMAT);
} else {
FileOutputFormat.setOutputPath(startJob, this.configuration.getOutputLocation());
startJob.setOutputFormatClass(this.derivationJob ? this.configuration.getGraphOutputFormat() : this.configuration.getStatisticsOutputFormat());
}
if (this.jobs.size() > 2) {
for (int i = 1; i < this.jobs.size() - 1; i++) {
final Job midJob = this.jobs.get(i);
midJob.setInputFormatClass(INTERMEDIATE_INPUT_FORMAT);
midJob.setOutputFormatClass(INTERMEDIATE_OUTPUT_FORMAT);
FileInputFormat.setInputPaths(midJob, this.intermediateFiles.get(this.intermediateFiles.size() - 1));
final Path path = new Path(UUID.randomUUID().toString());
FileOutputFormat.setOutputPath(midJob, path);
this.intermediateFiles.add(path);
}
}
if (this.jobs.size() > 1) {
final Job endJob = this.jobs.get(this.jobs.size() - 1);
endJob.setInputFormatClass(INTERMEDIATE_INPUT_FORMAT);
endJob.setOutputFormatClass(this.derivationJob ? this.configuration.getGraphOutputFormat() : this.configuration.getStatisticsOutputFormat());
FileInputFormat.setInputPaths(endJob, this.intermediateFiles.get(this.intermediateFiles.size() - 1));
FileOutputFormat.setOutputPath(endJob, this.configuration.getOutputLocation());
}
for (final Path path : this.intermediateFiles) {
try {
if (hdfs.exists(path)) {
hdfs.delete(path, true);
}
} catch (IOException e1) {
}
}
throw e;
}
for (final Job job : this.jobs) {
for (final Map.Entry |
| Solution content |
|---|
return this.groupCount(keyFunction, "{ it -> 1l}");
}
public FaunusPipeline groupCount(final String keyFunction, final String valueFunction) throws IOException {
if (state.getElementType().equals(Vertex.class)) {
compiler.distribution(Vertex.class, keyFunction, valueFunction);
} else {
compiler.distribution(Edge.class, keyFunction, valueFunction);
}
return this;
} |
| File |
|---|
| FaunusPipeline.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| For statement |
| If statement |
| Method invocation |
| Method signature |
| Try statement |
| Variable |