Tabnine Logo
GradoopFlinkConfig.createConfig
Code IndexAdd Tabnine to your IDE (free)

How to use
createConfig
method
in
org.gradoop.flink.util.GradoopFlinkConfig

Best Java code snippets using org.gradoop.flink.util.GradoopFlinkConfig.createConfig (Showing top 20 results out of 315)

origin: dbs-leipzig/gradoop

/**
 * Returns example integrated instance graph from GDL input.
 * @return integrated instance graph
 * @throws IOException
 */
public static LogicalGraph getIntegratedInstanceGraph() throws IOException {
 ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
 GradoopFlinkConfig gradoopConf = GradoopFlinkConfig.createConfig(env);
 FlinkAsciiGraphLoader loader = new FlinkAsciiGraphLoader(gradoopConf);
 String gdl = IOUtils.toString(CategoryCharacteristicPatterns.class
  .getResourceAsStream("/data/gdl/itbda.gdl"));
 gdl = gdl
  .replaceAll("SOURCEID_KEY",
   SOURCEID_KEY)
  .replaceAll("SUPERTYPE_KEY",
   SUPERTYPE_KEY)
  .replaceAll("SUPERCLASS_VALUE_MASTER",
   SUPERCLASS_VALUE_MASTER)
  .replaceAll("SUPERCLASS_VALUE_TRANSACTIONAL",
   SUPERCLASS_VALUE_TRANSACTIONAL);
 loader.initDatabaseFromString(gdl);
 return loader.getLogicalGraphByVariable("iig");
}
origin: dbs-leipzig/gradoop

/**
 * Example method to read a csv file and print the vertices of the generated graph.
 *
 * @param args program arguments
 * @throws Exception io exception if file not found
 */
public static void main(String[] args) throws Exception {
 ExecutionEnvironment env = getExecutionEnvironment();
 GradoopFlinkConfig config = GradoopFlinkConfig.createConfig(env);
 String exampleFile = MinimalCSVImportExample.class.
  getResource("/data/csv/minimalcsv/person.csv").getPath();
 DataSource source = new MinimalCSVImporter(exampleFile, "\\|", config, true);
 LogicalGraph graph = source.getLogicalGraph();
 graph.getVertices().print();
}
origin: dbs-leipzig/gradoop

/**
 * Example method to read a json file and print the vertices of the generated graph.
 *
 * @param args program arguments
 * @throws Exception io exception if file not found
 */
public static void main(String[] args) throws Exception {
 ExecutionEnvironment env = getExecutionEnvironment();
 GradoopFlinkConfig config = GradoopFlinkConfig.createConfig(env);
 String exampleFile = MinimalJSONImportExample.class.
  getResource("/data/json/minimaljson/person.json").getPath();
 DataSource source = new MinimalJSONImporter(exampleFile, config);
 LogicalGraph graph = source.getLogicalGraph();
 graph.getVertices().print();
}
origin: dbs-leipzig/gradoop

/**
 * Returns the configuration for the test
 *
 * @return Gradoop Flink configuration
 */
protected GradoopFlinkConfig getConfig() {
 if (config == null) {
  setConfig(GradoopFlinkConfig.createConfig(getExecutionEnvironment(),
   graphLayoutFactory,
   collectionLayoutFactory));
 }
 return config;
}
origin: dbs-leipzig/gradoop

GradoopFlinkConfig config = GradoopFlinkConfig.createConfig(env);
origin: dbs-leipzig/gradoop

/**
 * Returns an EPGM DataSource for a given directory and format.
 *
 * @param directory input path
 * @param format format in which the data is stored (csv, indexed, json)
 * @return DataSource for EPGM Data
 * @throws IOException on failure
 */
private static DataSource getDataSource(String directory, String format) throws IOException {
 directory = appendSeparator(directory);
 GradoopFlinkConfig config = GradoopFlinkConfig.createConfig(getExecutionEnvironment());
 format = format.toLowerCase();
 switch (format) {
 case "json":
  return new JSONDataSource(directory, config);
 case "csv":
  return new CSVDataSource(directory, config);
 case "indexed":
  return new IndexedCSVDataSource(directory, config);
 case "lgcsv":
  return new LogicalGraphCSVDataSource(directory, config);
 case "lgindexed":
  return new LogicalGraphIndexedCSVDataSource(directory, config);
 default:
  throw new IllegalArgumentException("Unsupported format: " + format);
 }
}
origin: dbs-leipzig/gradoop

GradoopFlinkConfig config = GradoopFlinkConfig.createConfig(env);
origin: dbs-leipzig/gradoop

@Override
protected GraphCollectionLayoutFactory<GraphHead, Vertex, Edge> getFactory() {
 // create the factory to test
 IndexedGVECollectionLayoutFactory factory = new IndexedGVECollectionLayoutFactory();
 // create a default gradoop flink config and set it to the layout
 GradoopFlinkConfig config = GradoopFlinkConfig.createConfig(getExecutionEnvironment());
 factory.setGradoopFlinkConfig(config);
 return factory;
}
origin: dbs-leipzig/gradoop

 @Override
 protected LogicalGraphLayoutFactory<GraphHead, Vertex, Edge> getFactory() {
  IndexedGVEGraphLayoutFactory logicalGraphLayoutFactory = new IndexedGVEGraphLayoutFactory();
  GradoopFlinkConfig config = GradoopFlinkConfig.createConfig(getExecutionEnvironment());
  config.setLogicalGraphLayoutFactory(logicalGraphLayoutFactory);
  return logicalGraphLayoutFactory;
 }
}
origin: dbs-leipzig/gradoop

 @Override
 protected LogicalGraphLayoutFactory<GraphHead, Vertex, Edge> getFactory() {
  // create the factory to test
  GVEGraphLayoutFactory factory = new GVEGraphLayoutFactory();
  // create a default gradoop flink config and set it to the layout
  GradoopFlinkConfig config = GradoopFlinkConfig.createConfig(getExecutionEnvironment());
  factory.setGradoopFlinkConfig(config);
  return factory;
 }
}
origin: dbs-leipzig/gradoop

 @Override
 protected GraphCollectionLayoutFactory<GraphHead, Vertex, Edge> getFactory() {
  // create the factory to test
  GVECollectionLayoutFactory factory = new GVECollectionLayoutFactory();
  // create a default gradoop flink config and set it to the layout
  GradoopFlinkConfig config = GradoopFlinkConfig.createConfig(getExecutionEnvironment());
  factory.setGradoopFlinkConfig(config);
  return factory;
 }
}
origin: dbs-leipzig/gradoop

 @Override
 protected GraphCollectionLayoutFactory<GraphHead, Vertex, Edge> getFactory() {
  TxCollectionLayoutFactory txCollectionLayoutFactory = new TxCollectionLayoutFactory();
  GradoopFlinkConfig config = GradoopFlinkConfig.createConfig(getExecutionEnvironment());
  config.setGraphCollectionLayoutFactory(txCollectionLayoutFactory);
  return txCollectionLayoutFactory;
 }
}
origin: dbs-leipzig/gradoop

GradoopFlinkConfig config = GradoopFlinkConfig.createConfig(getExecutionEnvironment());
origin: dbs-leipzig/gradoop

GradoopFlinkConfig config = GradoopFlinkConfig.createConfig(executionEnvironment);
origin: dbs-leipzig/gradoop

@Test
public void queryEdgeByProperty() throws Throwable {
 doTest(TEST01, (loader, store, config) -> {
  List<Edge> storeEdges = loader.getEdges().stream()
   .filter(it -> {
    assert it.getProperties() != null;
    return it.getProperties().get("since") != null &&
     Objects.equals(it.getProperties()
      .get("since")
      .getInt(), 2013);
   })
   .collect(Collectors.toList());
  AccumuloDataSource source = new AccumuloDataSource(
   store,
   GradoopFlinkConfig.createConfig(getExecutionEnvironment()));
  List<Edge> query = source.applyEdgePredicate(
   Query.elements()
    .fromAll()
    .where(AccumuloFilters.propEquals("since", 2013)))
   .getGraphCollection()
   .getEdges()
   .collect();
  GradoopTestUtils.validateEPGMElementCollections(storeEdges, query);
 });
}
origin: dbs-leipzig/gradoop

/**
 * Tries to add an unsupported property type {@link Queue} as property value.
 */
@Test(expected = UnsupportedTypeException.class)
public void wrongPropertyTypeTest() throws AccumuloSecurityException, AccumuloException {
 GradoopAccumuloConfig config = AccumuloTestSuite.getAcConfig(TEST04);
 AccumuloEPGMStore graphStore = new AccumuloEPGMStore(config);
 // Queue is not supported by
 final Queue<String> value = Queues.newPriorityQueue();
 GradoopId vertexID = GradoopId.get();
 final String label = "A";
 Properties props = Properties.create();
 props.set("k1", value);
 final GradoopIdSet graphs = new GradoopIdSet();
 GradoopFlinkConfig flinkConfig = GradoopFlinkConfig.createConfig(getExecutionEnvironment());
 graphStore.writeVertex(flinkConfig
  .getVertexFactory()
  .initVertex(vertexID, label, props, graphs));
}
origin: dbs-leipzig/gradoop

@BeforeClass
public static void setup() {
 ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
 GradoopFlinkConfig config = GradoopFlinkConfig.createConfig(env);
 GraphHead g0 = config.getGraphHeadFactory().createGraphHead("A");
 GraphHead g1 = config.getGraphHeadFactory().createGraphHead("B");
 Vertex v0 = config.getVertexFactory().createVertex("A");
 Vertex v1 = config.getVertexFactory().createVertex("B");
 Vertex v2 = config.getVertexFactory().createVertex("C");
 Edge e0 = config.getEdgeFactory().createEdge("a", v0.getId(), v1.getId());
 Edge e1 = config.getEdgeFactory().createEdge("b", v1.getId(), v2.getId());
 v0.addGraphId(g0.getId());
 v1.addGraphId(g0.getId());
 v1.addGraphId(g1.getId());
 v2.addGraphId(g1.getId());
 e0.addGraphId(g0.getId());
 e1.addGraphId(g1.getId());
 tx0 = new GraphTransaction(g0, Sets.newHashSet(v0, v1), Sets.newHashSet(e0));
 tx1 = new GraphTransaction(g1, Sets.newHashSet(v1, v2), Sets.newHashSet(e1));
}
origin: dbs-leipzig/gradoop

/**
 * Load social network graph and write it into accumulo graph
 *
 * @param namespace store namespace
 * @param context loader context
 * @throws Throwable if error
 */
protected void doTest(
 String namespace,
 SocialTestContext context
) throws Throwable {
 GradoopAccumuloConfig config = AccumuloTestSuite.getAcConfig(namespace);
 AccumuloEPGMStore graphStore = new AccumuloEPGMStore(config);
 //read vertices by label
 AsciiGraphLoader<GraphHead, Vertex, Edge> loader = GradoopTestUtils.getSocialNetworkLoader();
 // write social graph to Accumulo
 for (GraphHead g : loader.getGraphHeads()) {
  graphStore.writeGraphHead(g);
 }
 for (Vertex v : loader.getVertices()) {
  graphStore.writeVertex(v);
 }
 for (Edge e : loader.getEdges()) {
  graphStore.writeEdge(e);
 }
 graphStore.flush();
 GradoopFlinkConfig flinkConfig = GradoopFlinkConfig.createConfig(getExecutionEnvironment());
 context.test(loader, graphStore, flinkConfig);
}
origin: dbs-leipzig/gradoop

@Test
public void write() throws Exception {
 AccumuloEPGMStore accumuloStore = new AccumuloEPGMStore(AccumuloTestSuite.getAcConfig(TEST_02));
 FlinkAsciiGraphLoader loader = new FlinkAsciiGraphLoader(
  GradoopFlinkConfig.createConfig(getExecutionEnvironment()));
 InputStream inputStream = getClass().getResourceAsStream(
  GradoopTestUtils.SOCIAL_NETWORK_GDL_FILE);
 loader.initDatabaseFromStream(inputStream);
 GradoopFlinkConfig flinkConfig = GradoopFlinkConfig.createConfig(getExecutionEnvironment());
 new AccumuloDataSink(accumuloStore, flinkConfig)
  .write(flinkConfig.getGraphCollectionFactory()
   .fromCollections(
    loader.getGraphHeads(),
    loader.getVertices(),
    loader.getEdges()));
 getExecutionEnvironment().execute();
 accumuloStore.flush();
 validateEPGMElementCollections(loader.getGraphHeads(),
  accumuloStore.getGraphSpace().readRemainsAndClose());
 validateEPGMElementCollections(loader.getVertices(),
  accumuloStore.getVertexSpace().readRemainsAndClose());
 validateEPGMGraphElementCollections(loader.getVertices(),
  accumuloStore.getVertexSpace().readRemainsAndClose());
 validateEPGMElementCollections(loader.getEdges(),
  accumuloStore.getEdgeSpace().readRemainsAndClose());
 validateEPGMGraphElementCollections(loader.getEdges(),
  accumuloStore.getEdgeSpace().readRemainsAndClose());
 accumuloStore.close();
}
origin: dbs-leipzig/gradoop

@BeforeClass
public static void setup() {
 ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
 GradoopFlinkConfig config = GradoopFlinkConfig.createConfig(env);
 g0 = config.getGraphHeadFactory().createGraphHead("A");
 g1 = config.getGraphHeadFactory().createGraphHead("B");
 v0 = config.getVertexFactory().createVertex("A");
 v1 = config.getVertexFactory().createVertex("B");
 v2 = config.getVertexFactory().createVertex("C");
 e0 = config.getEdgeFactory().createEdge("a", v0.getId(), v1.getId());
 e1 = config.getEdgeFactory().createEdge("b", v1.getId(), v2.getId());
 v0.addGraphId(g0.getId());
 v1.addGraphId(g0.getId());
 v1.addGraphId(g1.getId());
 v2.addGraphId(g1.getId());
 e0.addGraphId(g0.getId());
 e1.addGraphId(g1.getId());
}
org.gradoop.flink.utilGradoopFlinkConfigcreateConfig

Javadoc

Creates a default Gradoop Flink configuration using POJO handlers.

Popular methods of GradoopFlinkConfig

  • getGraphCollectionFactory
    Returns a factory that is able to create graph collection layouts.
  • getExecutionEnvironment
    Returns the Flink execution environment.
  • getVertexFactory
  • getEdgeFactory
  • getLogicalGraphFactory
    Returns a factory that is able to create logical graph layouts.
  • getGraphHeadFactory
  • <init>
    Creates a new Configuration.
  • setGraphCollectionLayoutFactory
    Sets the layout factory for building layouts that represent a GraphCollection.
  • setLogicalGraphLayoutFactory
    Sets the layout factory for building layouts that represent a LogicalGraph.

Popular in Java

  • Start an intent from android
  • getExternalFilesDir (Context)
  • compareTo (BigDecimal)
  • notifyDataSetChanged (ArrayAdapter)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • String (java.lang)
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • JFrame (javax.swing)
  • JList (javax.swing)
  • Top PhpStorm plugins
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