edu.umd.cloud9.demo
Class DemoWordCountJSON
java.lang.Object
edu.umd.cloud9.demo.DemoWordCountJSON
public class DemoWordCountJSON
- extends Object
Demo that illustrates use of JSONObjectWritable objects as
intermediate keys in a MapReduce job. Input comes from the Bible+Shakespeare
sample collection, packed into a SequenceFile with DemoPackJSON.
Output shows the count of words on even- and odd-length lines.
Format of the output SequenceFile: The key is a JSON object. The field named
"Token" contains a word and the field named "EvenOrOdd" indicates whether the
word was found on a even-length or odd-length line. The value is the count of
the word on either even- or odd-length lines.
- See Also:
DemoWordCountTuple1,
DemoWordCountTuple2
|
Method Summary |
static void |
main(String[] args)
Runs the demo. |
main
public static void main(String[] args)
throws IOException
- Runs the demo.
- Throws:
IOException