Apache Pig is a high level data flow platform for execution Map Reduce programs of Hadoop. The language for Pig is pig Latin.
The Pig scripts get internally converted to Map Reduce jobs and get executed on data stored in HDFS. Every task which can be achieved using PIG can also be achieved using java used in Map reduce.
Usage of Pig
Let’s see the 3 usage of Pig technology.
1) Ease of programming
Writing complex java programs for map reduce is quiet tough for non programmers. Pig makes this process easy. In pig, the queries are converted to map reduce internally.
2) Optimization opportunities
The way in which tasks are encoded permits the system to optimize their execution automatically, allowing the user to focus on semantics rather than efficiency.
User defined function are written in which the user can write their own logic to execute over the data set.