tree: 31b4a027da3d9c5d738bd2c7ac723cfcee378bc0 [path history] [tgz]
  1. src/
  2. pom.xml
  3. README.md
examples/recordReader/README.md

This example shows how to use FSRecordReaderModule to read newline delimited records from a file convert them to plain old java objects (POJO) using CSVParser. These POJOs are converted to String using CsvFormatter and then written to output file using StringFileOutputOperator.

The properties file META-INF/properties.xml shows how to configure the respective operators.

The application can be run on an actual cluster or in local mode within your IDE by simply running the method ApplicationTest.testApplication().

One may tweak this example to add operator of their choice in between CSVParser and CsvFormatter to achieve functionality to suit your need.