@Test public void testWriteDistinctPropertyValuesByVertexLabelAndPropertyName() throws Exception { String tmpPath = temporaryFolder.getRoot().getPath(); LogicalGraph input = getSocialNetworkLoader().getLogicalGraph(true); DataSink statisticDataSink = new GraphStatisticsDataSink(tmpPath); statisticDataSink.write(input, true); getExecutionEnvironment().execute(); GraphStatistics statistics = GraphStatisticsLocalFSReader.read(tmpPath); assertThat(statistics.getDistinctVertexProperties("Person", "name"), is(6L)); assertThat(statistics.getDistinctVertexProperties("Person", "gender"), is(2L)); assertThat(statistics.getDistinctVertexProperties("Person", "city"), is(3L)); assertThat(statistics.getDistinctVertexProperties("Person", "age"), is(4L)); assertThat(statistics.getDistinctVertexProperties("Person", "speaks"), is(1L)); assertThat(statistics.getDistinctVertexProperties("Person", "locIP"), is(1L)); assertThat(statistics.getDistinctVertexProperties("Tag", "name"), is(3L)); assertThat(statistics.getDistinctVertexProperties("Forum", "title"), is(2L)); }
@Override public void write(LogicalGraph logicalGraph) throws IOException { write(logicalGraph, false); }
GraphStatisticsDataSink implements DataSink { @Override public void write(LogicalGraph logicalGraph) throws IOException { write(logicalGraph, false); } }
GraphStatisticsDataSink implements DataSink { @Override public void write(LogicalGraph logicalGraph) throws IOException { write(logicalGraph, false); } GraphStatisticsDataSink(final String path); }
GraphStatisticsDataSink implements DataSink { @Override public void write(LogicalGraph logicalGraph) throws IOException { write(logicalGraph, false); } GraphStatisticsDataSink(final String path); @Override void write(LogicalGraph logicalGraph); @Override void write(LogicalGraph logicalGraph, boolean overwrite); @Override void write(GraphCollection graphCollection); @Override void write(GraphCollection graphCollection, boolean overWrite); }
GraphStatisticsDataSink implements DataSink { @Override public void write(LogicalGraph logicalGraph) throws IOException { write(logicalGraph, false); } GraphStatisticsDataSink(final String path); @Override void write(LogicalGraph logicalGraph); @Override void write(LogicalGraph logicalGraph, boolean overwrite); @Override void write(GraphCollection graphCollection); @Override void write(GraphCollection graphCollection, boolean overWrite);  }