File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Questions on Programming Pig

 
Raymond Tong
Ranch Hand
Posts: 240
2
IntelliJ IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Satyaprakash Joshii
Ranch Hand
Posts: 195
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pig will be used when scripts are to be created....whereas ..for querying (e.g for data analyisis) HIve queries will be used.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic