final OperationChain<Void> addOpChain = new OperationChain.Builder() .first(new GenerateElements.Builder<String>() .generator(new TimestampSetElementGenerator()) .input(dummyData)
final OperationChain addOpChain = new OperationChain.Builder() .first(new GenerateElements.Builder<String>() .generator(new DataGenerator15()) .objects(DataUtils.loadData(getData())) final OperationChain<CloseableIterable<Edge>> job = new OperationChain.Builder() .first(new GetEdges.Builder<EntitySeed>() .addSeed(new EntitySeed("1")) .build())
final List<String> data = DataUtils.loadData(getData()); final OperationChain addOpChain = new OperationChain.Builder() .first(new GenerateElements.Builder<String>() .generator(dataGenerator) .objects(data) .first(new GetAdjacentEntitySeeds.Builder() .addSeed(new EntitySeed("1")) .inOutType(IncludeIncomingOutgoingType.OUTGOING)
final OperationChain<Void> addOpChain = new OperationChain.Builder() .first(new GenerateElements.Builder<String>() .generator(new RoadAndRoadUseElementGenerator()) .input(IOUtils.readLines(StreamUtil.openStream(getClass(), "RoadAndRoadUse/data.txt"))) .first(new GetAdjacentIds.Builder() .input(new EntitySeed("M5")) .inOutType(IncludeIncomingOutgoingType.OUTGOING)
final OperationChain<Void> addOpChain = new OperationChain.Builder() .first(new GenerateElements.Builder<String>() .generator(new LongsSketchElementGenerator()) .input(dummyData)
final OperationChain addOpChain = new OperationChain.Builder() .first(new GenerateElements.Builder<String>() .generator(new DataGenerator10()) .objects(dummyData)
.first(new GetAllElements.Builder() .view(new View.Builder() .edge("edge")
.first(new GetAllElements.Builder() .view(new View.Builder() .edge("edge")
public Iterable<? extends Element> sortOnCountAndTransientProperty() { final OperationChain<Iterable<? extends Element>> opChain = new OperationChain.Builder() .first(new GetElements.Builder() .input(new EntitySeed(1), new EntitySeed(2)) .view(new View.Builder()
public Element minCountAndTransientProperty() { final OperationChain<Element> opChain = new OperationChain.Builder() .first(new GetElements.Builder() .input(new EntitySeed(1), new EntitySeed(2)) .view(new View.Builder()
public Element maxCountAndTransientProperty() { final OperationChain<Element> opChain = new OperationChain.Builder() .first(new GetElements.Builder() .input(new EntitySeed(1), new EntitySeed(2)) .view(new View.Builder()
store.execute(new OperationChain.Builder() .first(new SampleDataForSplitPoints.Builder() .addInputMapperPairs(operation.getInputMapperPairs()) .jobInitialiser(operation.getJobInitialiser())
final OperationChain<Void> addOpChain = new OperationChain.Builder() .first(new GenerateElements.Builder<String>() .generator(new BoundedTimestampSetElementGenerator()) .input(dummyData)
final OperationChain addOpChain = new OperationChain.Builder() .first(new GenerateElements.Builder<String>() .generator(dataGenerator) .input(data)
public Map<String, CloseableIterable<?>> exportMultipleResultsToGafferResultCacheAndGetAllResults() { // --------------------------------------------------------- final OperationChain<Map<String, CloseableIterable<?>>> opChain = new OperationChain.Builder() .first(new GetAllElements()) .then(new ExportToGafferResultCache.Builder<>() .key("edges") .build()) .then(new DiscardOutput()) .then(new GetAllElements()) .then(new ExportToGafferResultCache.Builder<>() .key("entities") .build()) .then(new DiscardOutput()) .then(new GetExports.Builder() .exports(new GetGafferResultCacheExport.Builder() .key("edges") .build(), new GetGafferResultCacheExport.Builder() .key("entities") .build()) .build()) .build(); // --------------------------------------------------------- return runExample(opChain, null); } }
public Map<String, CloseableIterable<?>> exportMultipleResultsToSetAndGetAllResults() { // --------------------------------------------------------- final OperationChain<Map<String, CloseableIterable<?>>> opChain = new OperationChain.Builder() .first(new GetAllElements()) .then(new ExportToSet.Builder<>() .key("edges") .build()) .then(new DiscardOutput()) .then(new GetAllElements()) .then(new ExportToSet.Builder<>() .key("entities") .build()) .then(new DiscardOutput()) .then(new GetExports.Builder() .exports(new GetSetExport.Builder() .key("edges") .build(), new GetSetExport.Builder() .key("entities") .build()) .build()) .build(); // --------------------------------------------------------- return runExample(opChain, null); } }
public Map<String, CloseableIterable<?>> exportMultipleResultsToGafferResultCacheAndGetAllResults() { // --------------------------------------------------------- final OperationChain<Map<String, CloseableIterable<?>>> opChain = new OperationChain.Builder() .first(new GetAllElements()) .then(new ExportToGafferResultCache.Builder<>() .key("edges") .build()) .then(new DiscardOutput()) .then(new GetAllElements()) .then(new ExportToGafferResultCache.Builder<>() .key("entities") .build()) .then(new DiscardOutput()) .then(new GetExports.Builder() .exports(new GetGafferResultCacheExport.Builder() .key("edges") .build(), new GetGafferResultCacheExport.Builder() .key("entities") .build()) .build()) .build(); // --------------------------------------------------------- return runExample(opChain, null); } }
public Map<String, CloseableIterable<?>> exportMultipleResultsToSetAndGetAllResults() { // --------------------------------------------------------- final OperationChain<Map<String, CloseableIterable<?>>> opChain = new OperationChain.Builder() .first(new GetAllElements()) .then(new ExportToSet.Builder<>() .key("edges") .build()) .then(new DiscardOutput()) .then(new GetAllElements()) .then(new ExportToSet.Builder<>() .key("entities") .build()) .then(new DiscardOutput()) .then(new GetExports.Builder() .exports(new GetSetExport.Builder() .key("edges") .build(), new GetSetExport.Builder() .key("entities") .build()) .build()) .build(); // --------------------------------------------------------- return runExample(opChain, null); } }
protected Graph createExampleGraph() { final Graph graph = new Graph.Builder() .addSchemas(StreamUtil.openStreams(getClass(), "/example/operation/schema")) .storeProperties(StreamUtil.openStream(getClass(), "/example/operation/mockaccumulostore.properties")) .build(); // Create data generator final DataGenerator dataGenerator = new DataGenerator(); // Load data into memory final List<String> data = DataUtils.loadData(StreamUtil.openStream(getClass(), "/example/operation/data.txt", true)); //add the edges to the graph using an operation chain consisting of: //generateElements - generating edges from the data (note these are directed edges) //addElements - add the edges to the graph final OperationChain addOpChain = new OperationChain.Builder() .first(new GenerateElements.Builder<String>() .generator(dataGenerator) .objects(data) .build()) .then(new AddElements()) .build(); try { graph.execute(addOpChain, new User()); } catch (OperationException e) { throw new RuntimeException(e); } return graph; }
public Map<String, CloseableIterable<?>> exportMultipleResultsToGafferResultCacheAndGetAllResults() { // --------------------------------------------------------- final OperationChain<Map<String, CloseableIterable<?>>> opChain = new OperationChain.Builder() .first(new GetAllEdges()) .then(new ExportToGafferResultCache.Builder() .key("edges") .build()) .then(new GetAllEntities()) .then(new ExportToGafferResultCache.Builder() .key("entities") .build()) .then(new GetExports.Builder() .exports(new GetGafferResultCacheExport.Builder() .key("edges") .build(), new GetGafferResultCacheExport.Builder() .key("entities") .build()) .build()) .build(); // --------------------------------------------------------- return runExample(opChain); } }