|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.conf.Configured
edu.umd.cloud9.example.simple.DemoWordCountJSON
public class DemoWordCountJSON
Demo that illustrates use of JSONObjectWritable objects as
intermediate keys in a MapReduce job. This Hadoop Tool takes the following
command-line arguments:
Input comes from a flat text 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.
DemoWordCountTuple1,
DemoWordCountTuple2| Nested Class Summary | |
|---|---|
static class |
DemoWordCountJSON.MyKey
|
| Constructor Summary | |
|---|---|
DemoWordCountJSON()
Creates an instance of this tool. |
|
| Method Summary | |
|---|---|
static void |
main(String[] args)
Dispatches command-line arguments to the tool via the ToolRunner. |
int |
run(String[] args)
Runs this tool. |
| Methods inherited from class org.apache.hadoop.conf.Configured |
|---|
getConf, setConf |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.hadoop.conf.Configurable |
|---|
getConf, setConf |
| Constructor Detail |
|---|
public DemoWordCountJSON()
| Method Detail |
|---|
public int run(String[] args)
throws Exception
run in interface ToolException
public static void main(String[] args)
throws Exception
ToolRunner.
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||