zeppelin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jongy...@apache.org
Subject zeppelin git commit: [ZEPPELIN-922] New interpreter registration mechanism for Scalding
Date Thu, 22 Dec 2016 15:32:43 GMT
Repository: zeppelin
Updated Branches:
  refs/heads/master cb7d82d78 -> 7f15b7b16


[ZEPPELIN-922] New interpreter registration mechanism for Scalding

### What is this PR for?
Applies the new interpreter registration mechanism to Alluxio interpreter.

### What type of PR is it?
Improvement

### Todos
- [x] Remove static registration in org.apache.zeppelin.scalding.ScaldingInterpreter
- [x] Create interpreter-setting.json

### What is the Jira issue?
[ZEPPELIN-922](https://issues.apache.org/jira/browse/ZEPPELIN-922)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Igor Drozdov <igor_drozdov@epam.com>

Closes #1759 from DrIgor/ZEPPELIN-922 and squashes the following commits:

921fe1c [Igor Drozdov] New interpreter registration mechanism for Scalding


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/7f15b7b1
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/7f15b7b1
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/7f15b7b1

Branch: refs/heads/master
Commit: 7f15b7b16413d91c91d215a677bcedbcddc9e7ce
Parents: cb7d82d
Author: Igor Drozdov <igor_drozdov@epam.com>
Authored: Tue Dec 13 14:40:08 2016 +0300
Committer: Jongyoul Lee <jongyoul@apache.org>
Committed: Fri Dec 23 00:32:33 2016 +0900

----------------------------------------------------------------------
 .../zeppelin/scalding/ScaldingInterpreter.java   | 12 ------------
 .../src/main/resources/interpreter-setting.json  | 19 +++++++++++++++++++
 2 files changed, 19 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7f15b7b1/scalding/src/main/java/org/apache/zeppelin/scalding/ScaldingInterpreter.java
----------------------------------------------------------------------
diff --git a/scalding/src/main/java/org/apache/zeppelin/scalding/ScaldingInterpreter.java
b/scalding/src/main/java/org/apache/zeppelin/scalding/ScaldingInterpreter.java
index 282cd2e..db58268 100644
--- a/scalding/src/main/java/org/apache/zeppelin/scalding/ScaldingInterpreter.java
+++ b/scalding/src/main/java/org/apache/zeppelin/scalding/ScaldingInterpreter.java
@@ -57,18 +57,6 @@ public class ScaldingInterpreter extends Interpreter {
   public static final List NO_COMPLETION =
     Collections.unmodifiableList(new ArrayList<>());
 
-  static {
-    Interpreter.register(
-      "scalding",
-      "scalding",
-      ScaldingInterpreter.class.getName(),
-      new InterpreterPropertyBuilder()
-        .add(ARGS_STRING, ARGS_STRING_DEFAULT, "Arguments for scalding REPL")
-        .add(MAX_OPEN_INSTANCES, MAX_OPEN_INSTANCES_DEFAULT,
-                "Maximum number of open interpreter instances")
-        .build());
-  }
-
   static int numOpenInstances = 0;
   private ScaldingILoop interpreter;
   private ByteArrayOutputStream out;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7f15b7b1/scalding/src/main/resources/interpreter-setting.json
----------------------------------------------------------------------
diff --git a/scalding/src/main/resources/interpreter-setting.json b/scalding/src/main/resources/interpreter-setting.json
new file mode 100644
index 0000000..a2efa4d
--- /dev/null
+++ b/scalding/src/main/resources/interpreter-setting.json
@@ -0,0 +1,19 @@
+[
+  {
+    "group": "scalding",
+    "name": "scalding",
+    "className": "org.apache.zeppelin.scalding.ScaldingInterpreter",
+    "properties": {
+      "args.string": {
+        "envName": null,
+        "defaultValue": "--local --repl",
+        "description": "Arguments for scalding REPL"
+      },
+      "max.open.instances": {
+        "envName": null,
+        "defaultValue": "50",
+        "description": "Maximum number of open interpreter instances"
+      }
+    }
+  }
+]


Mime
View raw message