Apache PIG interview questions

36. Modes of Execution for Apache Pig
Apache Pig can be started either in cluster mode or in local mode. To start Apache Pig in local mode, the developers should use the option “-x local”. If no option is specified then Pig by default is started in the cluster mode. The cluster mode allows Pig to access data file present on HDFS, whereas in local mode only files within the local file system can be accessed.

37. Does Pig support multi-line commands?
Yes

38. Explain the need for MapReduce while programming in Apache Pig.
The Pig engine converts the queries into MapReduce jobs and thus MapReduce acts as the execution engine and is needed to run the programs.

39. What do you mean by a bag in Pig?
Collection of tuples is referred as a bag in Apache Pig

40. PIG Illustrate
illustrate takes a sample from the data and whenever it comes across operators like join or filter that remove data, it ensures that only some records pass through and some do not, by making modifications to the records such that they meet the condition. illustrate just shows the output of each stage but does not run any MapReduce task.

Author: user

Leave a Reply