Repository: zeppelin
Updated Branches:
  refs/heads/master b86148c61 -> 93ac1d523


[ZEPPELIN-919] Apply new mechanism to Markdown

### What is this PR for?
This PR applies the new interpreter registration mechanism to Markdown

### What type of PR is it?
Improvement

### Todos
- Move interpreter registration properties from static block to 
interpreter-setting.json

### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-919

### How should this be tested?
1. apply patch
2. rm -r interpreter/md
3. rm conf/interpreter.json
4. mvn clean package -DskipTests
5. bin/zeppelin-daemon.sh start
6. run some paragraph with markdown

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

Author: Rerngvit Yanggratoke <[email protected]>

Closes #1216 from rerngvit/ZEPPELIN-919 and squashes the following commits:

f044ed6 [Rerngvit Yanggratoke] This PR applies the new interpreter registration 
mechanism to Markdown


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

Branch: refs/heads/master
Commit: 93ac1d523bb994e94ce5ef7e73574c454814f6da
Parents: b86148c
Author: Rerngvit Yanggratoke <[email protected]>
Authored: Fri Jul 22 00:14:14 2016 +0200
Committer: Prabhjyot Singh <[email protected]>
Committed: Tue Jul 26 12:43:48 2016 +0530

----------------------------------------------------------------------
 .../src/main/java/org/apache/zeppelin/markdown/Markdown.java | 4 ----
 markdown/src/main/resources/interpreter-setting.json         | 8 ++++++++
 2 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/93ac1d52/markdown/src/main/java/org/apache/zeppelin/markdown/Markdown.java
----------------------------------------------------------------------
diff --git a/markdown/src/main/java/org/apache/zeppelin/markdown/Markdown.java 
b/markdown/src/main/java/org/apache/zeppelin/markdown/Markdown.java
index a738802..4a26dac 100644
--- a/markdown/src/main/java/org/apache/zeppelin/markdown/Markdown.java
+++ b/markdown/src/main/java/org/apache/zeppelin/markdown/Markdown.java
@@ -40,10 +40,6 @@ public class Markdown extends Interpreter {
   private Markdown4jProcessor md;
   static final Logger LOGGER = LoggerFactory.getLogger(Markdown.class);
 
-  static {
-    Interpreter.register("md", Markdown.class.getName());
-  }
-
   public Markdown(Properties property) {
     super(property);
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/93ac1d52/markdown/src/main/resources/interpreter-setting.json
----------------------------------------------------------------------
diff --git a/markdown/src/main/resources/interpreter-setting.json 
b/markdown/src/main/resources/interpreter-setting.json
new file mode 100644
index 0000000..1e5d10c
--- /dev/null
+++ b/markdown/src/main/resources/interpreter-setting.json
@@ -0,0 +1,8 @@
+[
+  {
+    "group": "md",
+    "name": "md",
+    "className": "org.apache.zeppelin.markdown.Markdown",
+    "properties": null
+  }
+]

Reply via email to