Before you begin
Before running the examples, you must install and register the Netezza Analytics map/reduce cartridge.
Use the following commands to install and register map/reduce in the inza
database:
$ nzcm -i mapreduce
$ nzcm -r mapreduce
$ export PATH=$PATH:/nz/export/ae/products/netezza/mapreduce/current/bin/
The
mapreduce-examples.jar file contains a set of examples with the following
class names:dbcount, for click countinggrep, for counting words matching a patternpi, for estimating Pi number using the quasi-Monte Carlo methodwordcount, for counting words in a document collection
All examples in mapreduce-examples.jar can be run using the following command
structure:
$ mapreduce jar mapreduce-examples.jar <class_name> <args>To view the usage, run the command without arguments. For example, using the wordcount class_name
without arguments:
$ mapreduce jar mapreduce-examples.jar wordcount
Produces the following
output:
Missing required options: outTable, outKeyCols, outValueCols, inTable,
inKeyCols, db, inValueCols, maxWordLength
usage: WordCount
-db <arg> database name
-enableCombiner enable default combiner
-enablePartitioner enable default partitioner
-inKeyCols <arg> list of input key columns names (comma separated)
-inTable <arg> input table name
-inValueCols <arg> list of input value columns names (comma
separated)
-maxWordLength <arg> maximum length of a single word in the input table
-outKeyCols <arg> list of output key columns names (comma separated)
-outTable <arg> output table name
-outValueCols <arg> list of output value columns names (comma
separated)