Book Image

Mastering Apache Cassandra - Second Edition

Book Image

Mastering Apache Cassandra - Second Edition

Overview of this book

Table of Contents (15 chapters)
Mastering Apache Cassandra Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Integration with Pig


Configuring Hadoop with Cassandra in itself is quite some work. Writing verbose and long Java code to do something as simple as a word count is a turnoff to a high-level user like a data analyst. Wouldn't it be nice if we have a SQL-like interpreter that converts commands to MapReduce programs for us? Pig is exactly that tool.

Hadoop does not only support Java but MapReduce programs can also be written more concisely in multiple languages such as Scala, Python, C++ (Pipes), R, and many adapter languages.

Pig provides a SQL-like language called Pig Latin. One can write complex MapReduce programs using Pig Latin. You can create a set of intermediate variables that are the result of an operation and it can be used in subsequent operations, in the same way as a stored procedure in the RDBMS world. Finally, the output of an operation can be displayed on a screen or can be stored in a permanent storage such as HDFS or Cassandra.

Installing Pig

Installing Pig is very simple, what...