Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

However, you do need to tell CDAP the relative paths of the input and output files. Currently, this is only possible by specifying them as runtime arguments when the MapReduce program is started:

Expand
titleLinux

...

Code Block
$ curl -w"\n" -X POST "http://example.com:11015/v3/namespaces/default/apps/FileSetExample/mapreduce/WordCount/start" \
-d '{ "dataset.lines.input.paths": "monday/my.txt", "dataset.counts.output.path": "monday/counts.out" }'
Expand
titleWindows
Code Block
> curl -X POST "http://example.com:11015/v3/namespaces/default/apps/FileSetExample/mapreduce/WordCount/start" ^
-d "{ \"dataset.lines.input.paths\": \"monday/my.txt\", \"dataset.counts.output.path\": \"monday/counts.out\" }"

Using the CDAP CLI:

Expand
titleCDAP CLI
Code Block
cdap > start mapreduce FileSetExample.WordCount "dataset.lines.input.paths=monday/my.txt dataset.counts.output.path=monday/counts.out"

Note that for the input you can specify multiple paths separated by commas:

...