IntelliJ Java IDE
The moose likes Distributed Java and the fly likes Questions on Programming Pig Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Reply Bookmark "Questions on Programming Pig" Watch "Questions on Programming Pig" New topic
Author

Questions on Programming Pig

Raymond Tong
Ranch Hand

Joined: Aug 15, 2010
Posts: 146

Hi Alan,

Hive and Pig sounds similar to me. Would your book mention their differences, use cases?

You have mentioned for advance features, Java or Python may be needed. Would it also includes other JVM-language like Groovy, Scala?

How Pig/Hadoop compare to NoSQL? Or they could be used together to form a solution?

Thanks,
Raymond
Alan Gates
author
Greenhorn

Joined: Nov 29, 2011
Posts: 7
The short answer to the Hive/Pig question is that SQL (which Hive uses) allows users to answer questions, and hence is good in situations where you want to answer a question (analysis, report generation). Pig allows users to build a data flow, and is good in situations where you want to transform your data (ETL, data modeling, etc.). I do cover this is more detail in the book.

At this point the only supported languages are Java and Python. There is experimental support for JavaScript and a patch has been posted for Ruby. We wrote it such that any language that compiles down to the JVM can be supported, so Groovy is do-able, but no one has yet. Scala I expect would just work since it operates so nicely with Java, though to my knowledge no one has tried it yet.

NoSQL is a pretty broad term, and like all "flavor of the month" terms has been co-opted by marketing to sell about everything. If we define NoSQL as the new set of data stores focussed around massive scale, non-relational layouts, and high read and/or write volumes, so things like HBase, Cassandra, MongoDB, etc. then Pig (and MapReduce on which it is based) is a little different. Pig does scale massively, and it handles non-relational data nicely. But it is oriented around batch processing, not high volume reads and writes. But there are connectors in Pig for Hive and Cassandra, so that data stored in one can be accessed by the other. So yes, you can combine them to form a solution, with your NoSQL store serving the read/write cases and Pig/MapReduce performing large batch operations for you.

Alan.
 
 
subject: Questions on Programming Pig
 
Threads others viewed
WA #1.....word association
SCJP Brainteaser (10)
Pet animal
[Rated R+] Joke
Is Pig for beginners in programming?