/** * Configures the string that starts comments for the Edge Csv Reader. * By default comments will be treated as invalid lines. * This function only recognizes comments which start at the beginning of the line! * * @param commentPrefix The string that starts the comments. * @return The GraphCSVReader instance itself, to allow for fluent function chaining. */ public GraphCsvReader ignoreCommentsEdges(String commentPrefix) { this.edgeReader.ignoreComments(commentPrefix); return this; }
/** * Configures the string that starts comments for the Vertex Csv Reader. * By default comments will be treated as invalid lines. * This function only recognizes comments which start at the beginning of the line! * * @param commentPrefix The string that starts the comments. * @return The GraphCSVReader instance itself, to allow for fluent function chaining. */ public GraphCsvReader ignoreCommentsVertices(String commentPrefix) { if (this.vertexReader != null) { this.vertexReader.ignoreComments(commentPrefix); } return this; }
private static DataSet<Edge<Long, Double>> getEdgesDataSet(ExecutionEnvironment env) { if (fileOutput) { return env.readCsvFile(edgesInputPath) .lineDelimiter("\n") .fieldDelimiter("\t") .ignoreComments("%") .types(Long.class, Long.class, Double.class) .map(new Tuple3ToEdgeMap<>()); } else { return SingleSourceShortestPathsData.getDefaultEdgeDataSet(env); } }
@Test public void testIgnoreComments() { CsvReader reader = getCsvReader(); assertNull(reader.commentPrefix); reader.ignoreComments("#"); assertEquals("#", reader.commentPrefix); }
/** * Configures the string that starts comments for the Edge Csv Reader. * By default comments will be treated as invalid lines. * This function only recognizes comments which start at the beginning of the line! * * @param commentPrefix The string that starts the comments. * @return The GraphCSVReader instance itself, to allow for fluent function chaining. */ public GraphCsvReader ignoreCommentsEdges(String commentPrefix) { this.edgeReader.ignoreComments(commentPrefix); return this; }
/** * Configures the string that starts comments for the Edge Csv Reader. * By default comments will be treated as invalid lines. * This function only recognizes comments which start at the beginning of the line! * * @param commentPrefix The string that starts the comments. * @return The GraphCSVReader instance itself, to allow for fluent function chaining. */ public GraphCsvReader ignoreCommentsEdges(String commentPrefix) { this.edgeReader.ignoreComments(commentPrefix); return this; }
/** * Configures the string that starts comments for the Edge Csv Reader. * By default comments will be treated as invalid lines. * This function only recognizes comments which start at the beginning of the line! * * @param commentPrefix The string that starts the comments. * @return The GraphCSVReader instance itself, to allow for fluent function chaining. */ public GraphCsvReader ignoreCommentsEdges(String commentPrefix) { this.edgeReader.ignoreComments(commentPrefix); return this; }
/** * Configures the string that starts comments for the Vertex Csv Reader. * By default comments will be treated as invalid lines. * This function only recognizes comments which start at the beginning of the line! * * @param commentPrefix The string that starts the comments. * @return The GraphCSVReader instance itself, to allow for fluent function chaining. */ public GraphCsvReader ignoreCommentsVertices(String commentPrefix) { if(this.vertexReader != null) { this.vertexReader.ignoreComments(commentPrefix); } return this; }
/** * Configures the string that starts comments for the Vertex Csv Reader. * By default comments will be treated as invalid lines. * This function only recognizes comments which start at the beginning of the line! * * @param commentPrefix The string that starts the comments. * @return The GraphCSVReader instance itself, to allow for fluent function chaining. */ public GraphCsvReader ignoreCommentsVertices(String commentPrefix) { if (this.vertexReader != null) { this.vertexReader.ignoreComments(commentPrefix); } return this; }
/** * Configures the string that starts comments for the Vertex Csv Reader. * By default comments will be treated as invalid lines. * This function only recognizes comments which start at the beginning of the line! * * @param commentPrefix The string that starts the comments. * @return The GraphCSVReader instance itself, to allow for fluent function chaining. */ public GraphCsvReader ignoreCommentsVertices(String commentPrefix) { if (this.vertexReader != null) { this.vertexReader.ignoreComments(commentPrefix); } return this; }