Tabnine Logo
GraphCollectionFactory.fromTransactions
Code IndexAdd Tabnine to your IDE (free)

How to use
fromTransactions
method
in
org.gradoop.flink.model.impl.epgm.GraphCollectionFactory

Best Java code snippets using org.gradoop.flink.model.impl.epgm.GraphCollectionFactory.fromTransactions (Showing top 20 results out of 315)

origin: dbs-leipzig/gradoop

@Override
public GraphCollection execute(GraphCollection collection)  {
 config = collection.getConfig();
 DataSet<GraphTransaction> input = collection
  .getGraphTransactions();
 DataSet<GraphTransaction> output = execute(input);
 return config.getGraphCollectionFactory()
  .fromTransactions(output);
}
origin: org.gradoop/gradoop-flink

@Override
public GraphCollection execute(GraphCollection collection)  {
 config = collection.getConfig();
 DataSet<GraphTransaction> input = collection
  .getGraphTransactions();
 DataSet<GraphTransaction> output = execute(input);
 return config.getGraphCollectionFactory()
  .fromTransactions(output);
}
origin: org.gradoop/gradoop-flink

@Override
public GraphCollection executeForTxLayout(GraphCollection collection) {
 DataSet<GraphTransaction> updatedTransactions = collection.getGraphTransactions()
  .map(new AggregateTransactions(aggregateFunctions));
 return collection.getConfig().getGraphCollectionFactory().fromTransactions(updatedTransactions);
}
origin: dbs-leipzig/gradoop

@Override
public GraphCollection executeForTxLayout(GraphCollection collection) {
 DataSet<GraphTransaction> updatedTransactions = collection.getGraphTransactions()
  .map(new AggregateTransactions(aggregateFunctions));
 return collection.getConfig().getGraphCollectionFactory().fromTransactions(updatedTransactions);
}
origin: org.gradoop/gradoop-flink

/**
 * Executes the operator for collections based on
 * {@link org.gradoop.flink.model.impl.layouts.transactional.TxCollectionLayout}
 *
 * @param collection graph collection
 * @return result graph collection
 */
private GraphCollection executeForTxLayout(GraphCollection collection) {
 DataSet<GraphTransaction> filteredTransactions = collection.getGraphTransactions()
  .filter(new FilterTransactions(predicate));
 return collection.getConfig().getGraphCollectionFactory()
  .fromTransactions(filteredTransactions);
}
origin: dbs-leipzig/gradoop

 /**
  * Executes the operator for collections based on
  * {@link org.gradoop.flink.model.impl.layouts.transactional.TxCollectionLayout}
  *
  * @param collection graph collection
  * @return result graph collection
  */
 private GraphCollection executeForTxLayout(GraphCollection collection) {
  DataSet<GraphTransaction> filteredTransactions = collection.getGraphTransactions()
   .filter(new FilterTransactions(predicate));

  return collection.getConfig().getGraphCollectionFactory()
   .fromTransactions(filteredTransactions);
 }
}
origin: dbs-leipzig/gradoop

 GRADOOP_CONFIG.getGraphCollectionFactory().fromTransactions(frequentPatterns),
 true);
getExecutionEnvironment().execute();
origin: org.gradoop/gradoop-flink

@Override
public GraphCollection execute(GraphCollection collection) {
 // convert Gradoop graph collection to DIMSpan input format
 DataSet<LabeledGraphStringString> input = collection
  .getGraphTransactions()
  .map(new EPGMGraphTransactionToLabeledGraph());
 // run DIMSpan
 DataSet<GraphTransaction> output = dimSpan.execute(input);
 // convert to Gradoop graph collection
 return collection.getConfig().getGraphCollectionFactory().fromTransactions(output);
}
origin: dbs-leipzig/gradoop

@Override
public GraphCollection execute(GraphCollection collection) {
 // convert Gradoop graph collection to DIMSpan input format
 DataSet<LabeledGraphStringString> input = collection
  .getGraphTransactions()
  .map(new EPGMGraphTransactionToLabeledGraph());
 // run DIMSpan
 DataSet<GraphTransaction> output = dimSpan.execute(input);
 // convert to Gradoop graph collection
 return collection.getConfig().getGraphCollectionFactory().fromTransactions(output);
}
origin: dbs-leipzig/gradoop

 GRADOOP_CONFIG.getGraphCollectionFactory().fromTransactions(output),
 true);
getExecutionEnvironment().execute();
origin: dbs-leipzig/gradoop

 @Override
 public GraphCollection executeForTxLayout(GraphCollection collection) {
  DataSet<GraphTransaction> graphTransactions = collection.getGraphTransactions();

  GradoopFlinkConfig config = collection.getConfig();

  DataSet<GraphTransaction> transformedGraphTransactions = graphTransactions
   .map(new TransformGraphTransaction(
    collection.getFactory().getGraphHeadFactory(),
    graphHeadTransFunc,
    collection.getFactory().getVertexFactory(),
    vertexTransFunc,
    collection.getFactory().getEdgeFactory(),
    edgeTransFunc
   ));

  return config.getGraphCollectionFactory().fromTransactions(transformedGraphTransactions);
 }
}
origin: org.gradoop/gradoop-flink

 @Override
 public GraphCollection executeForTxLayout(GraphCollection collection) {
  DataSet<GraphTransaction> graphTransactions = collection.getGraphTransactions();

  GradoopFlinkConfig config = collection.getConfig();

  DataSet<GraphTransaction> transformedGraphTransactions = graphTransactions
   .map(new TransformGraphTransaction(
    collection.getFactory().getGraphHeadFactory(),
    graphHeadTransFunc,
    collection.getFactory().getVertexFactory(),
    vertexTransFunc,
    collection.getFactory().getEdgeFactory(),
    edgeTransFunc
   ));

  return config.getGraphCollectionFactory().fromTransactions(transformedGraphTransactions);
 }
}
origin: org.gradoop/gradoop-flink

   getEdgeDictionary(), TLFConstants.EDGE_DICTIONARY);
return getConfig().getGraphCollectionFactory().fromTransactions(transactions);
origin: dbs-leipzig/gradoop

   getEdgeDictionary(), TLFConstants.EDGE_DICTIONARY);
return getConfig().getGraphCollectionFactory().fromTransactions(transactions);
origin: dbs-leipzig/gradoop

@Test
public void testTransformation() throws Exception {
 FlinkAsciiGraphLoader loader = getSocialNetworkLoader();
 GraphCollection originalCollection = loader.getGraphCollection();
 DataSet<GraphTransaction> transactions = originalCollection.getGraphTransactions();
 GraphCollection restoredCollection = getConfig().getGraphCollectionFactory()
  .fromTransactions(transactions);
 collectAndAssertTrue(
  originalCollection.equalsByGraphIds(restoredCollection));
 collectAndAssertTrue(
  originalCollection.equalsByGraphElementIds(restoredCollection));
 collectAndAssertTrue(
  originalCollection.equalsByGraphData(restoredCollection));
}
origin: dbs-leipzig/gradoop

@Test
public void testRead() throws Exception {
 String tlfFile = getFilePath("/data/tlf/io_test_string.tlf");
 // create datasource
 DataSource dataSource = new TLFDataSource(tlfFile, getConfig());
 // get transactions
 DataSet<GraphTransaction> transactions = dataSource.getGraphCollection().getGraphTransactions();
 String asciiGraphs = "" +
  "g1[(v1:A)-[:a]->(v2:B)-[:b]->(v1)]" +
  "g2[(v1:A)-[:a]->(v2:B)<-[:b]-(v1)]";
 FlinkAsciiGraphLoader loader = getLoaderFromString(asciiGraphs);
 collectAndAssertTrue(
  loader.getGraphCollectionByVariables("g1", "g2").equalsByGraphData(
   getConfig().getGraphCollectionFactory().fromTransactions(transactions)
  )
 );
}
origin: dbs-leipzig/gradoop

@Test
public void testReadWithoutEdges() throws Exception {
 String tlfFile = getFilePath("/data/tlf/io_test_string_without_edges.tlf");
 // create datasource
 DataSource dataSource = new TLFDataSource(tlfFile, getConfig());
 // get transactions
 DataSet<GraphTransaction> transactions = dataSource.getGraphCollection().getGraphTransactions();
 String asciiGraphs = "" +
  "g1[(v1:A),(v2:B)]" +
  "g2[(v1:A),(v2:B)]";
 FlinkAsciiGraphLoader loader = getLoaderFromString(asciiGraphs);
 collectAndAssertTrue(
 loader.getGraphCollectionByVariables("g1", "g2").equalsByGraphData(
 getConfig().getGraphCollectionFactory().fromTransactions(transactions)
 )
 );
}
origin: dbs-leipzig/gradoop

@Test
public void testTransformationWithCustomReducer() throws Exception {
 FlinkAsciiGraphLoader loader = getSocialNetworkLoader();
 GraphCollection originalCollection = loader.getGraphCollection();
 DataSet<GraphTransaction> transactions = originalCollection.getGraphTransactions();
 GraphCollection restoredCollection = getConfig().getGraphCollectionFactory()
  .fromTransactions(transactions, new First<>(), new First<>());
 collectAndAssertTrue(
  originalCollection.equalsByGraphIds(restoredCollection));
 collectAndAssertTrue(
  originalCollection.equalsByGraphElementIds(restoredCollection));
 collectAndAssertTrue(
  originalCollection.equalsByGraphData(restoredCollection));
}
origin: dbs-leipzig/gradoop

 @Test
 public void testWithSubsetGraphContainment() throws Exception {
  FlinkAsciiGraphLoader loader = getSocialNetworkLoader();

  loader.appendToDatabaseFromString("g1[(eve)]");

  GraphCollection originalCollection = loader.getGraphCollectionByVariables("g1");

  DataSet<GraphTransaction> transactions = originalCollection.getGraphTransactions();

  GraphCollection restoredCollection = getConfig().getGraphCollectionFactory()
   .fromTransactions(transactions, new First<>(), new First<>());

  collectAndAssertTrue(
   originalCollection.equalsByGraphIds(restoredCollection));

  collectAndAssertTrue(
   originalCollection.equalsByGraphElementIds(restoredCollection));

  collectAndAssertTrue(
   originalCollection.equalsByGraphData(restoredCollection));
 }
}
origin: dbs-leipzig/gradoop

 @Test
 public void testReadWithDictionary() throws Exception {
  String tlfFile = getFilePath("/data/tlf/io_test.tlf");
  String tlfVertexDictionaryFile = getFilePath("/data/tlf/io_test_vertex_dictionary.tlf");
  String tlfEdgeDictionaryFile = getFilePath("/data/tlf/io_test_edge_dictionary.tlf");

  // create datasource
  DataSource dataSource = new TLFDataSource(tlfFile, tlfVertexDictionaryFile,
   tlfEdgeDictionaryFile, getConfig());
  // get transactions
  DataSet<GraphTransaction> transactions = dataSource.getGraphCollection().getGraphTransactions();

  String asciiGraphs = "" +
   "g1[(v1:A)-[:a]->(v2:B)-[:b]->(v1)]" +
   "g2[(v1:A)-[:a]->(v2:B)<-[:b]-(v1)]";

  FlinkAsciiGraphLoader loader = getLoaderFromString(asciiGraphs);

  collectAndAssertTrue(
   loader.getGraphCollectionByVariables("g1", "g2").equalsByGraphData(
    getConfig().getGraphCollectionFactory().fromTransactions(transactions)
   )
  );
 }
}
org.gradoop.flink.model.impl.epgmGraphCollectionFactoryfromTransactions

Popular methods of GraphCollectionFactory

  • fromGraph
  • createEmptyCollection
  • fromCollections
  • fromDataSets
  • <init>
    Creates a new factory.
  • fromGraphs
  • fromIndexedDataSets

Popular in Java

  • Reading from database using SQL prepared statement
  • compareTo (BigDecimal)
  • getResourceAsStream (ClassLoader)
  • getContentResolver (Context)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now