final String input = (args.length > 1 ? args[1] : "");
final String output = (args.length > 2 ? args[2] : "");
// This task will read the input data and generate the key/value pairs
final FileDataSource source =
new FileDataSource(new TeraInputFormat(), input, "Data Source");
source.setDegreeOfParallelism(numSubTasks);
// This task writes the sorted data back to disk
final FileDataSink sink =
new FileDataSink(new TeraOutputFormat(), output, "Data Sink");