Skip to content

Commit

Permalink
[ZEPPELIN-922] New interpreter registration mechanism for Scalding
Browse files Browse the repository at this point in the history
### 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 <[email protected]>

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

921fe1c [Igor Drozdov] New interpreter registration mechanism for Scalding
  • Loading branch information
DrIgor authored and jongyoul committed Dec 22, 2016
1 parent cb7d82d commit 7f15b7b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
19 changes: 19 additions & 0 deletions scalding/src/main/resources/interpreter-setting.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
]

0 comments on commit 7f15b7b

Please sign in to comment.