From 5e2e222555dabfb66a7981e5d7d0d0f659ca1144 Mon Sep 17 00:00:00 2001 From: AhyoungRyu Date: Sun, 9 Oct 2016 21:35:07 +0900 Subject: [PATCH 1/3] Minor update for pig.md --- docs/interpreter/pig.md | 46 ++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/docs/interpreter/pig.md b/docs/interpreter/pig.md index 96146570e2..44c1a5506c 100644 --- a/docs/interpreter/pig.md +++ b/docs/interpreter/pig.md @@ -1,40 +1,52 @@ --- layout: page title: "Pig Interpreter" -description: "" +description: "Apache Pig is a platform for analyzing large data sets that consists of a high-level language for expressing data analysis programs, coupled with infrastructure for evaluating these programs." group: manual --- {% include JB/setup %} -## Pig nterpreter for Apache Zeppelin +# Pig Interpreter for Apache Zeppelin + +
+ +## Overview [Apache Pig](https://pig.apache.org/) is a platform for analyzing large data sets that consists of a high-level language for expressing data analysis programs, coupled with infrastructure for evaluating these programs. The salient property of Pig programs is that their structure is amenable to substantial parallelization, which in turns enables them to handle very large data sets. ## Supported interpreter type - - %pig.script (default) - All the pig script can run in the type of interpreter, and display type if plain text. - - %pig.query - Almost the same as %pig.script. the only difference is that you don't need to add alias in the last statement. And the display type is table. - + - `%pig.script` (default) + + All the pig script can run in the type of interpreter, and display type if plain text. + + - `%pig.query` + + Almost the same as `%pig.script`. The only difference is that you don't need to add alias in the last statement. And the display type is table. ## Supported runtime mode - Local - MapReduce - Tez (Only Tez 0.7 is supported) +## How to use + ### How to setup Pig - Local Mode -Nothing needs to be done for local mode + + Nothing needs to be done for local mode - MapReduce Mode -HADOOP_CONF_DIR needs to be specified in `zeppelin-env.sh` + + HADOOP\_CONF\_DIR needs to be specified in `ZEPPELIN_HOME/conf/zeppelin-env.sh`. - Tez Mode -HADOOP_CONF_DIR and TEZ_CONF_DIR needs to be specified in `zeppelin-env.sh` + + HADOOP\_CONF\_DIR and TEZ\_CONF\_DIR needs to be specified in `ZEPPELIN_HOME/conf/zeppelin-env.sh`. ### How to configure interpreter -At the Interpreters menu, you have to create a new Pig interpreter and provide next properties: - +At the Interpreters menu, you have to create a new Pig interpreter. Pig interpreter has below properties by default. @@ -50,18 +62,18 @@ At the Interpreters menu, you have to create a new Pig interpreter and provide n - + - +
zeppelin.pig.includeJobStats falsewhether display jobStats info in %pigwhether display jobStats info in %pig
zeppelin.pig.maxResult 20max row number displayed in %pig.querymax row number displayed in %pig.query
-### How to use +### Example -**pig** +##### pig ``` %pig @@ -72,7 +84,8 @@ c = foreach b generate COUNT($1); dump c; ``` -**pig.query** +##### pig.query + ``` %pig.query @@ -81,5 +94,4 @@ c = group b by Category; foreach c generate group as category, COUNT($1) as count; ``` - -Data is shared between %pig and %pig.query, so that you can do some common work in %pig, and do different kinds of query based on the data of %pig. +Data is shared between `%pig` and `%pig.query`, so that you can do some common work in `%pig`, and do different kinds of query based on the data of `%pig`. From df7a6db47ca2db5b8d3ed625000d6a25f035a8e5 Mon Sep 17 00:00:00 2001 From: AhyoungRyu Date: Sun, 9 Oct 2016 21:35:25 +0900 Subject: [PATCH 2/3] Add pig.md to dropdown menu --- docs/_includes/themes/zeppelin/_navigation.html | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/_includes/themes/zeppelin/_navigation.html b/docs/_includes/themes/zeppelin/_navigation.html index a0e4485db8..9abcdb177d 100644 --- a/docs/_includes/themes/zeppelin/_navigation.html +++ b/docs/_includes/themes/zeppelin/_navigation.html @@ -62,6 +62,7 @@
  • Lens
  • Livy
  • Markdown
  • +
  • Pig
  • Python
  • Postgresql, HAWQ
  • R
  • From fe014a72b445f6977d00356bfe780c40dade0167 Mon Sep 17 00:00:00 2001 From: AhyoungRyu Date: Sun, 9 Oct 2016 21:39:41 +0900 Subject: [PATCH 3/3] Fix docs title in front matter --- docs/interpreter/pig.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/interpreter/pig.md b/docs/interpreter/pig.md index 44c1a5506c..aab48ecf10 100644 --- a/docs/interpreter/pig.md +++ b/docs/interpreter/pig.md @@ -1,6 +1,6 @@ --- layout: page -title: "Pig Interpreter" +title: "Pig Interpreter for Apache Zeppelin" description: "Apache Pig is a platform for analyzing large data sets that consists of a high-level language for expressing data analysis programs, coupled with infrastructure for evaluating these programs." group: manual ---