edu.umd.cloud9.demo
Class DemoWordCountJSON

java.lang.Object
  extended by 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

Nested Class Summary
static class DemoWordCountJSON.MyKey
           
 
Method Summary
static void main(String[] args)
          Runs the demo.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(String[] args)
                 throws IOException
Runs the demo.

Throws:
IOException