Database Reference
In-Depth Information
sensor31 column=f:max, timestamp=1412373703177,
value=85
sensor31 column=f:min, timestamp=1412373703177,
value=72
sensor33 column=f:max, timestamp=1412373703177,
value=75
sensor33 column=f:min, timestamp=1412373703177,
value=72
sensor44 column=f:max, timestamp=1412373703184,
value=55
sensor44 column=f:min, timestamp=1412373703184,
value=42
sensor45 column=f:max, timestamp=1412373703184,
value=57
sensor45 column=f:min, timestamp=1412373703184,
value=47
sensor55 column=f:max, timestamp=1412373703184,
value=55
sensor55 column=f:min, timestamp=1412373703184,
value=42
7 row(s) in 0.0820 seconds
There you go; you can see that seven rows have been inserted!
With Pig, it was very easy. It took us just two lines of Pig script to do the import.
Java MapReduce
We have just demonstrated MapReduce using Pig, and you now know that Pig is
a concise and high-level way to write MapReduce programs. This is demonstrated
by our previous script, essentially the two lines of Pig code. However, there are
situations where you do want to use the Java API, and it would make more sense
to use it than using a Pig script. This can happen when you need Java to access Java
libraries or do some other detailed tasks for which Pig is not a good match. For that,
we have provided the Java version of the MapReduce code in our GitHub repository.
 
Search WWH ::




Custom Search