Skip to content

Commit 75fc4f7

Browse files
committed
add interpreter to navigation.html and remove extra spaces and lines
1 parent 9b1b385 commit 75fc4f7

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

beam/pom.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@
1414
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1515
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
1616
<modelVersion>4.0.0</modelVersion>
17-
18-
19-
20-
17+
2118
<parent>
2219
<artifactId>zeppelin</artifactId>
2320
<groupId>org.apache.zeppelin</groupId>

beam/src/main/java/org/apache/zeppelin/beam/StaticRepl.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,10 @@ public static String execute(String generatedClassName, String code) throws Exce
8484
}
8585

8686
// if there isn't Main method, will retuen error
87-
if (mainClassName == null)
87+
if (mainClassName == null) {
88+
LOGGER.error("Exception for Main method", "There isn't any class containing Main method.");
8889
throw new Exception("There isn't any class containing Main method.");
90+
}
8991

9092
// replace name of class containing Main method with generated name
9193
code = code.replace(mainClassName, generatedClassName);
@@ -150,22 +152,22 @@ public static String execute(String generatedClassName, String code) throws Exce
150152
LOGGER.error("Exception in Interpreter while Class not found", e);
151153
System.err.println("Class not found: " + e);
152154
throw new Exception(baosErr.toString());
153-
155+
154156
} catch (NoSuchMethodException e) {
155157
LOGGER.error("Exception in Interpreter while No such method", e);
156158
System.err.println("No such method: " + e);
157159
throw new Exception(baosErr.toString());
158-
160+
159161
} catch (IllegalAccessException e) {
160162
LOGGER.error("Exception in Interpreter while Illegal access", e);
161163
System.err.println("Illegal access: " + e);
162164
throw new Exception(baosErr.toString());
163-
165+
164166
} catch (InvocationTargetException e) {
165167
LOGGER.error("Exception in Interpreter while Invocation target", e);
166168
System.err.println("Invocation target: " + e);
167169
throw new Exception(baosErr.toString());
168-
170+
169171
} finally {
170172

171173
System.out.flush();

docs/_includes/themes/zeppelin/_navigation.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
<li role="separator" class="divider"></li>
4848
<li class="title"><span><b>Available Interpreters</b><span></li>
4949
<li><a href="{{BASE_PATH}}/interpreter/alluxio.html">Alluxio</a></li>
50+
<li><a href="{{BASE_PATH}}/interpreter/beam.html">Beam</a></li>
5051
<li><a href="{{BASE_PATH}}/interpreter/bigquery.html">BigQuery</a></li>
5152
<li><a href="{{BASE_PATH}}/interpreter/cassandra.html">Cassandra</a></li>
5253
<li><a href="{{BASE_PATH}}/interpreter/elasticsearch.html">Elasticsearch</a></li>

docs/interpreter/beam.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ limitations under the License.
2626

2727
## Overview
2828
[Apache Beam](http://beam.incubator.apache.org) is an open source unified platform for data processing pipelines. A pipeline can be build using one of the Beam SDKs.
29-
The execution of the pipeline is done by different Runners . Currently, Beam supports Apache Flink Runner, Apache Spark Runner, and Google Dataflow Runner.
29+
The execution of the pipeline is done by different Runners. Currently, Beam supports Apache Flink Runner, Apache Spark Runner, and Google Dataflow Runner.
3030

3131
## How to use
32-
Basically, you can write normal Beam java code where you can determine the Runner. You should write the main method inside a class becuase the interpreter invoke this main to execute the pipline. Unlike Zeppelin normal pattern, each paragraph is considered a separate job, there isn't any relation to any other paragraph.
32+
Basically, you can write normal Beam java code where you can determine the Runner. You should write the main method inside a class becuase the interpreter invoke this main to execute the pipline. Unlike Zeppelin normal pattern, each paragraph is considered a separate job, there isn't any relation to any other paragraph.
3333

34-
The following is a demonstration of a word count example
34+
The following is a demonstration of a word count example
3535

3636
```
3737
%beam

0 commit comments

Comments
 (0)