public GraphCsvReader(Path vertexPath, Path edgePath, ExecutionEnvironment context) { this.vertexPath = vertexPath; this.edgePath = edgePath; this.vertexReader = new CsvReader(vertexPath, context); this.edgeReader = new CsvReader(edgePath, context); this.mapper = null; this.executionContext = context; }
public <K, VV> GraphCsvReader(Path edgePath, final MapFunction<K, VV> mapper, ExecutionEnvironment context) { this.vertexPath = null; this.edgePath = edgePath; this.edgeReader = new CsvReader(edgePath, context); this.vertexReader = null; this.mapper = mapper; this.executionContext = context; }
public GraphCsvReader(Path edgePath, ExecutionEnvironment context) { this.vertexPath = null; this.edgePath = edgePath; this.edgeReader = new CsvReader(edgePath, context); this.vertexReader = null; this.mapper = null; this.executionContext = context; }
/** * Creates a CSV reader to read a comma separated value (CSV) file. The reader has options to * define parameters and field types and will eventually produce the DataSet that corresponds to * the read and parsed CSV input. * * @param filePath The path of the CSV file. * @return A CsvReader that can be used to configure the CSV input. */ public CsvReader readCsvFile(String filePath) { return new CsvReader(filePath, this); }
private static CsvReader getCsvReader() { return new CsvReader("/some/none/existing/path", ExecutionEnvironment.createLocalEnvironment(1)); }
public GraphCsvReader(Path edgePath, ExecutionEnvironment context) { this.vertexPath = null; this.edgePath = edgePath; this.edgeReader = new CsvReader(edgePath, context); this.vertexReader = null; this.mapper = null; this.executionContext = context; }
public GraphCsvReader(Path vertexPath, Path edgePath, ExecutionEnvironment context) { this.vertexPath = vertexPath; this.edgePath = edgePath; this.vertexReader = new CsvReader(vertexPath, context); this.edgeReader = new CsvReader(edgePath, context); this.mapper = null; this.executionContext = context; }
/** * Creates a CSV reader to read a comma separated value (CSV) file. The reader has options to * define parameters and field types and will eventually produce the DataSet that corresponds to * the read and parsed CSV input. * * @param filePath The path of the CSV file. * @return A CsvReader that can be used to configure the CSV input. */ public CsvReader readCsvFile(String filePath) { return new CsvReader(filePath, this); }
public GraphCsvReader(Path vertexPath, Path edgePath, ExecutionEnvironment context) { this.vertexPath = vertexPath; this.edgePath = edgePath; this.vertexReader = new CsvReader(vertexPath, context); this.edgeReader = new CsvReader(edgePath, context); this.mapper = null; this.executionContext = context; }
/** * Creates a CSV reader to read a comma separated value (CSV) file. The reader has options to * define parameters and field types and will eventually produce the DataSet that corresponds to * the read and parsed CSV input. * * @param filePath The path of the CSV file. * @return A CsvReader that can be used to configure the CSV input. */ public CsvReader readCsvFile(String filePath) { return new CsvReader(filePath, this); }
/** * Creates a CSV reader to read a comma separated value (CSV) file. The reader has options to * define parameters and field types and will eventually produce the DataSet that corresponds to * the read and parsed CSV input. * * @param filePath The path of the CSV file. * @return A CsvReader that can be used to configure the CSV input. */ public CsvReader readCsvFile(String filePath) { return new CsvReader(filePath, this); }
public <K, VV> GraphCsvReader(Path edgePath, final MapFunction<K, VV> mapper, ExecutionEnvironment context) { this.vertexPath = null; this.edgePath = edgePath; this.edgeReader = new CsvReader(edgePath, context); this.vertexReader = null; this.mapper = mapper; this.executionContext = context; }
public GraphCsvReader(Path edgePath, ExecutionEnvironment context) { this.vertexPath = null; this.edgePath = edgePath; this.edgeReader = new CsvReader(edgePath, context); this.vertexReader = null; this.mapper = null; this.executionContext = context; }
public <K, VV> GraphCsvReader(Path edgePath, final MapFunction<K, VV> mapper, ExecutionEnvironment context) { this.vertexPath = null; this.edgePath = edgePath; this.edgeReader = new CsvReader(edgePath, context); this.vertexReader = null; this.mapper = mapper; this.executionContext = context; }
public GraphCsvReader(Path vertexPath, Path edgePath, ExecutionEnvironment context) { this.vertexPath = vertexPath; this.edgePath = edgePath; this.vertexReader = new CsvReader(vertexPath, context); this.edgeReader = new CsvReader(edgePath, context); this.mapper = null; this.executionContext = context; }
public <K, VV> GraphCsvReader(Path edgePath, final MapFunction<K, VV> mapper, ExecutionEnvironment context) { this.vertexPath = null; this.edgePath = edgePath; this.edgeReader = new CsvReader(edgePath, context); this.vertexReader = null; this.mapper = mapper; this.executionContext = context; }
final Path csvpath = Paths.get(statSource); try ( final InputStream in = Files.newInputStream(csvpath); final CsvReader csv = new CsvReader(in, ';', Charset.forName("windows-1250"); ) { // operate on csv }
CsvReader products = new CsvReader("CSV file path "); products.readHeaders(); while (products.readRecord()) { String productID = products.get("year"); String productName = products.get("class"); String supplierID = products.get("day"); String categoryID = products.get("mm"); } products.close();
private static SingleOutputStreamOperator<Order> getOrdersDataStream(StreamExecutionEnvironment env, String ordersPath, boolean useSourceV2) { final CsvReader csvReader = new CsvReader(ordersPath, ExecutionEnvironment.getExecutionEnvironment()) .fieldDelimiter("|") .includeFields("110010010"); final TupleCsvInputFormat<Order> inputFormat = csvReader.generateTupleCsvInputFormat(Order.class); if (useSourceV2) { return env.createInputV2(inputFormat, inputFormat.getTupleTypeInfo(), "Order source v2"); } else { return env.createInput(inputFormat, inputFormat.getTupleTypeInfo(), "Order source v1"); } }
private static SingleOutputStreamOperator<Lineitem> getLineitemDataStream(StreamExecutionEnvironment env, String lineitemPath, boolean useSourceV2) { final CsvReader csvReader = new CsvReader(lineitemPath, ExecutionEnvironment.getExecutionEnvironment()) .fieldDelimiter("|") .includeFields("1000011000100000"); final TupleCsvInputFormat<Lineitem> inputFormat = csvReader.generateTupleCsvInputFormat(Lineitem.class); if (useSourceV2) { return env.createInputV2(inputFormat, inputFormat.getTupleTypeInfo(), "Lineitem source v2"); } else { return env.createInput(inputFormat, inputFormat.getTupleTypeInfo(), "Lineitem source v1"); } }