Beginning Apache Cassandra Development by Vivek Mishra

Beginning Apache Cassandra Development by Vivek Mishra

Author:Vivek Mishra [Mishra, Vivek]
Language: eng
Format: epub, pdf
Tags: Computers, Databases, Data Processing, Data Mining
ISBN: 9781484201428
Google: H1YnCgAAQBAJ
Publisher: Apress
Published: 2014-12-08T20:39:54+00:00


Counting Tweets

In this example we will demonstrate running various Pig commands using the interactive Grunt shell. For Pig scripts having a medium level of complexity, we may want to prepare and run those as Pig scripts, as well. The command to run a Pig script is as follows:

Pig –x local myscript.pig

Here myscript.pig is a compiled Pig script. We can also execute such Pig scripts in embedded mode as follows:

// Compile to .class file

javac –cp pig.jar MyScript.java

// Running Pig script as java program in embeddeded mode

java –cp:pig.jar:. MyScript

In this exercise, we will explore Apache Pig for running the MapReduce program for total tweet count and counting tweets for a specific screen_name. 1.First load tweets using PigStorage:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.