Skip to content

Commit 1ae7db2

Browse files
authored
Merge pull request #2 from AhyoungRyu/ZEPPELIN-335/docs
[ZEPPELIN-335][DOCS] Minor update for pig.md
2 parents 39f161a + fe014a7 commit 1ae7db2

File tree

2 files changed

+31
-18
lines changed

2 files changed

+31
-18
lines changed

docs/_includes/themes/zeppelin/_navigation.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
<li><a href="{{BASE_PATH}}/interpreter/lens.html">Lens</a></li>
6363
<li><a href="{{BASE_PATH}}/interpreter/livy.html">Livy</a></li>
6464
<li><a href="{{BASE_PATH}}/interpreter/markdown.html">Markdown</a></li>
65+
<li><a href="{{BASE_PATH}}/interpreter/pig.html">Pig</a></li>
6566
<li><a href="{{BASE_PATH}}/interpreter/python.html">Python</a></li>
6667
<li><a href="{{BASE_PATH}}/interpreter/postgresql.html">Postgresql, HAWQ</a></li>
6768
<li><a href="{{BASE_PATH}}/interpreter/r.html">R</a></li>

docs/interpreter/pig.md

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,52 @@
11
---
22
layout: page
3-
title: "Pig Interpreter"
4-
description: ""
3+
title: "Pig Interpreter for Apache Zeppelin"
4+
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."
55
group: manual
66
---
77
{% include JB/setup %}
88

99

10-
## Pig nterpreter for Apache Zeppelin
10+
# Pig Interpreter for Apache Zeppelin
11+
12+
<div id="toc"></div>
13+
14+
## Overview
1115
[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.
1216

1317
## Supported interpreter type
14-
- %pig.script (default) - All the pig script can run in the type of interpreter, and display type if plain text.
15-
- %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.
16-
18+
- `%pig.script` (default)
19+
20+
All the pig script can run in the type of interpreter, and display type if plain text.
21+
22+
- `%pig.query`
23+
24+
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.
1725

1826
## Supported runtime mode
1927
- Local
2028
- MapReduce
2129
- Tez (Only Tez 0.7 is supported)
2230

31+
## How to use
32+
2333
### How to setup Pig
2434

2535
- Local Mode
26-
Nothing needs to be done for local mode
36+
37+
Nothing needs to be done for local mode
2738

2839
- MapReduce Mode
29-
HADOOP_CONF_DIR needs to be specified in `zeppelin-env.sh`
40+
41+
HADOOP\_CONF\_DIR needs to be specified in `ZEPPELIN_HOME/conf/zeppelin-env.sh`.
3042

3143
- Tez Mode
32-
HADOOP_CONF_DIR and TEZ_CONF_DIR needs to be specified in `zeppelin-env.sh`
3344

34-
### How to configure interpreter
45+
HADOOP\_CONF\_DIR and TEZ\_CONF\_DIR needs to be specified in `ZEPPELIN_HOME/conf/zeppelin-env.sh`.
3546

36-
At the Interpreters menu, you have to create a new Pig interpreter and provide next properties:
47+
### How to configure interpreter
3748

49+
At the Interpreters menu, you have to create a new Pig interpreter. Pig interpreter has below properties by default.
3850

3951
<table class="table-configuration">
4052
<tr>
@@ -50,18 +62,18 @@ At the Interpreters menu, you have to create a new Pig interpreter and provide n
5062
<tr>
5163
<td>zeppelin.pig.includeJobStats</td>
5264
<td>false</td>
53-
<td>whether display jobStats info in %pig</td>
65+
<td>whether display jobStats info in <code>%pig</code></td>
5466
</tr>
5567
<tr>
5668
<td>zeppelin.pig.maxResult</td>
5769
<td>20</td>
58-
<td>max row number displayed in %pig.query</td>
70+
<td>max row number displayed in <code>%pig.query</code></td>
5971
</tr>
6072
</table>
6173

62-
### How to use
74+
### Example
6375

64-
**pig**
76+
##### pig
6577

6678
```
6779
%pig
@@ -72,7 +84,8 @@ c = foreach b generate COUNT($1);
7284
dump c;
7385
```
7486

75-
**pig.query**
87+
##### pig.query
88+
7689
```
7790
%pig.query
7891
@@ -81,5 +94,4 @@ c = group b by Category;
8194
foreach c generate group as category, COUNT($1) as count;
8295
```
8396

84-
85-
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.
97+
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`.

0 commit comments

Comments
 (0)