zeppelin git commit: [Branch-0.7] Support for Zeppelin Context redefinition on Python
Repository: zeppelin Updated Branches: refs/heads/branch-0.7 22fecd3e5 -> d742b7e68 [Branch-0.7] Support for Zeppelin Context redefinition on Python Fixes a build problem in Zeppelin branch0.7. Hotfix. same pr #2207 Author: CloverHeartsCloses #2257 from cloverhearts/fix/branch-0.7-build-hotfix and squashes the following commits: 2da0b423b [CloverHearts] fix branch-0.7 build error a3a615c3b [CloverHearts] [Zeppelin-802] Support for Zeppelin Context redefinition on Python and Pyspark Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/d742b7e6 Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/d742b7e6 Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/d742b7e6 Branch: refs/heads/branch-0.7 Commit: d742b7e68ea8b8877abd3533d98d3e92515c9136 Parents: 22fecd3 Author: CloverHearts Authored: Mon Apr 17 22:39:08 2017 +0900 Committer: Jongyoul Lee Committed: Mon Apr 17 23:17:53 2017 +0900 -- .../zeppelin/python/PythonInterpreter.java | 2 +- .../python/PythonInterpreterPandasSql.java | 3 +- .../main/resources/python/zeppelin_python.py| 16 +--- .../zeppelin/python/PythonInterpreterTest.java | 13 ++ .../zeppelin/spark/PySparkInterpreter.java | 8 ++-- .../main/resources/python/zeppelin_pyspark.py | 42 ++-- .../zeppelin/spark/PySparkInterpreterTest.java | 15 +++ 7 files changed, 75 insertions(+), 24 deletions(-) -- http://git-wip-us.apache.org/repos/asf/zeppelin/blob/d742b7e6/python/src/main/java/org/apache/zeppelin/python/PythonInterpreter.java -- diff --git a/python/src/main/java/org/apache/zeppelin/python/PythonInterpreter.java b/python/src/main/java/org/apache/zeppelin/python/PythonInterpreter.java index df62406..7f6a7eb 100644 --- a/python/src/main/java/org/apache/zeppelin/python/PythonInterpreter.java +++ b/python/src/main/java/org/apache/zeppelin/python/PythonInterpreter.java @@ -222,7 +222,7 @@ public class PythonInterpreter extends Interpreter implements ExecuteResultHandl // Add matplotlib display hook InterpreterGroup intpGroup = getInterpreterGroup(); if (intpGroup != null && intpGroup.getInterpreterHookRegistry() != null) { - registerHook(HookType.POST_EXEC_DEV, "z._displayhook()"); + registerHook(HookType.POST_EXEC_DEV, "__zeppelin__._displayhook()"); } // Add matplotlib display hook try { http://git-wip-us.apache.org/repos/asf/zeppelin/blob/d742b7e6/python/src/main/java/org/apache/zeppelin/python/PythonInterpreterPandasSql.java -- diff --git a/python/src/main/java/org/apache/zeppelin/python/PythonInterpreterPandasSql.java b/python/src/main/java/org/apache/zeppelin/python/PythonInterpreterPandasSql.java index 6bf1970..e73d7b3 100644 --- a/python/src/main/java/org/apache/zeppelin/python/PythonInterpreterPandasSql.java +++ b/python/src/main/java/org/apache/zeppelin/python/PythonInterpreterPandasSql.java @@ -87,7 +87,8 @@ public class PythonInterpreterPandasSql extends Interpreter { LOG.info("Running SQL query: '{}' over Pandas DataFrame", st); Interpreter python = getPythonInterpreter(); -return python.interpret("z.show(pysqldf('" + st + "'))\nz._displayhook()", context); +return python.interpret( +"__zeppelin__.show(pysqldf('" + st + "'))\n__zeppelin__._displayhook()", context); } @Override http://git-wip-us.apache.org/repos/asf/zeppelin/blob/d742b7e6/python/src/main/resources/python/zeppelin_python.py -- diff --git a/python/src/main/resources/python/zeppelin_python.py b/python/src/main/resources/python/zeppelin_python.py index a537c5d..31b993d 100644 --- a/python/src/main/resources/python/zeppelin_python.py +++ b/python/src/main/resources/python/zeppelin_python.py @@ -195,6 +195,7 @@ host = "127.0.0.1" if len(sys.argv) >= 3: host = sys.argv[2] +_zcUserQueryNameSpace = {} client = GatewayClient(address=host, port=int(sys.argv[1])) #gateway = JavaGateway(client, auto_convert = True) @@ -204,8 +205,11 @@ intp = gateway.entry_point intp.onPythonScriptInitialized(os.getpid()) java_import(gateway.jvm, "org.apache.zeppelin.display.Input") -z = PyZeppelinContext(intp) -z._setup_matplotlib() +z = __zeppelin__ = PyZeppelinContext(intp) +__zeppelin__._setup_matplotlib() + +_zcUserQueryNameSpace["__zeppelin__"] = __zeppelin__ +_zcUserQueryNameSpace["z"] = z output = Logger() sys.stdout = output @@ -227,7 +231,7 @@ while True : global_hook = None try: - user_hook = z.getHook('post_exec') + user_hook =
[zeppelin] Git Push Summary [forced push!] [Forced Update!]
Repository: zeppelin Updated Branches: refs/heads/branch-0.7 2e7b8ec6d -> d4cacadaf (forced update)
svn commit: r1791664 [3/5] - in /zeppelin/site/docs/0.8.0-SNAPSHOT: ./ development/ displaysystem/ install/ interpreter/ manual/ quickstart/ rest-api/ security/ storage/
Modified: zeppelin/site/docs/0.8.0-SNAPSHOT/interpreter/geode.html URL: http://svn.apache.org/viewvc/zeppelin/site/docs/0.8.0-SNAPSHOT/interpreter/geode.html?rev=1791664=1791663=1791664=diff == --- zeppelin/site/docs/0.8.0-SNAPSHOT/interpreter/geode.html (original) +++ zeppelin/site/docs/0.8.0-SNAPSHOT/interpreter/geode.html Mon Apr 17 07:01:48 2017 @@ -164,10 +164,11 @@ Notebook Authorization Data Source Authorization -Helium Framework -Writing Zeppelin Application (Experimental) -Writing Zeppelin Spell (Experimental) -Writing Zeppelin Visualization (Experimental) +Helium Framework (Experimental) +Writing Zeppelin Application +Writing Zeppelin Spell +Writing Zeppelin Visualization: Basics +Writing Zeppelin Visualization: Transformation Advanced Zeppelin on Vagrant VM Modified: zeppelin/site/docs/0.8.0-SNAPSHOT/interpreter/groovy.html URL: http://svn.apache.org/viewvc/zeppelin/site/docs/0.8.0-SNAPSHOT/interpreter/groovy.html?rev=1791664=1791663=1791664=diff == --- zeppelin/site/docs/0.8.0-SNAPSHOT/interpreter/groovy.html (original) +++ zeppelin/site/docs/0.8.0-SNAPSHOT/interpreter/groovy.html Mon Apr 17 07:01:48 2017 @@ -164,10 +164,11 @@ Notebook Authorization Data Source Authorization -Helium Framework -Writing Zeppelin Application (Experimental) -Writing Zeppelin Spell (Experimental) -Writing Zeppelin Visualization (Experimental) +Helium Framework (Experimental) +Writing Zeppelin Application +Writing Zeppelin Spell +Writing Zeppelin Visualization: Basics +Writing Zeppelin Visualization: Transformation Advanced Zeppelin on Vagrant VM Modified: zeppelin/site/docs/0.8.0-SNAPSHOT/interpreter/hbase.html URL: http://svn.apache.org/viewvc/zeppelin/site/docs/0.8.0-SNAPSHOT/interpreter/hbase.html?rev=1791664=1791663=1791664=diff == --- zeppelin/site/docs/0.8.0-SNAPSHOT/interpreter/hbase.html (original) +++ zeppelin/site/docs/0.8.0-SNAPSHOT/interpreter/hbase.html Mon Apr 17 07:01:48 2017 @@ -164,10 +164,11 @@ Notebook Authorization Data Source Authorization -Helium Framework -Writing Zeppelin Application (Experimental) -Writing Zeppelin Spell (Experimental) -Writing Zeppelin Visualization (Experimental) +Helium Framework (Experimental) +Writing Zeppelin Application +Writing Zeppelin Spell +Writing Zeppelin Visualization: Basics +Writing Zeppelin Visualization: Transformation Advanced Zeppelin on Vagrant VM Modified: zeppelin/site/docs/0.8.0-SNAPSHOT/interpreter/hdfs.html URL: http://svn.apache.org/viewvc/zeppelin/site/docs/0.8.0-SNAPSHOT/interpreter/hdfs.html?rev=1791664=1791663=1791664=diff == --- zeppelin/site/docs/0.8.0-SNAPSHOT/interpreter/hdfs.html (original) +++ zeppelin/site/docs/0.8.0-SNAPSHOT/interpreter/hdfs.html Mon Apr 17 07:01:48 2017 @@ -164,10 +164,11 @@ Notebook Authorization Data Source Authorization -Helium Framework -Writing Zeppelin Application (Experimental) -Writing Zeppelin Spell (Experimental) -Writing Zeppelin Visualization (Experimental) +Helium Framework (Experimental) +Writing Zeppelin Application +Writing Zeppelin Spell +Writing Zeppelin Visualization: Basics +Writing Zeppelin Visualization: Transformation Advanced Zeppelin on Vagrant VM Modified: zeppelin/site/docs/0.8.0-SNAPSHOT/interpreter/hive.html URL: http://svn.apache.org/viewvc/zeppelin/site/docs/0.8.0-SNAPSHOT/interpreter/hive.html?rev=1791664=1791663=1791664=diff == --- zeppelin/site/docs/0.8.0-SNAPSHOT/interpreter/hive.html (original) +++ zeppelin/site/docs/0.8.0-SNAPSHOT/interpreter/hive.html Mon Apr 17 07:01:48 2017 @@ -164,10 +164,11 @@ Notebook Authorization Data Source
svn commit: r1791664 [4/5] - in /zeppelin/site/docs/0.8.0-SNAPSHOT: ./ development/ displaysystem/ install/ interpreter/ manual/ quickstart/ rest-api/ security/ storage/
Modified: zeppelin/site/docs/0.8.0-SNAPSHOT/search.html URL: http://svn.apache.org/viewvc/zeppelin/site/docs/0.8.0-SNAPSHOT/search.html?rev=1791664=1791663=1791664=diff == --- zeppelin/site/docs/0.8.0-SNAPSHOT/search.html (original) +++ zeppelin/site/docs/0.8.0-SNAPSHOT/search.html Mon Apr 17 07:01:48 2017 @@ -164,10 +164,11 @@ Notebook Authorization Data Source Authorization -Helium Framework -Writing Zeppelin Application (Experimental) -Writing Zeppelin Spell (Experimental) -Writing Zeppelin Visualization (Experimental) +Helium Framework (Experimental) +Writing Zeppelin Application +Writing Zeppelin Spell +Writing Zeppelin Visualization: Basics +Writing Zeppelin Visualization: Transformation Advanced Zeppelin on Vagrant VM Modified: zeppelin/site/docs/0.8.0-SNAPSHOT/search_data.json URL: http://svn.apache.org/viewvc/zeppelin/site/docs/0.8.0-SNAPSHOT/search_data.json?rev=1791664=1791663=1791664=diff == --- zeppelin/site/docs/0.8.0-SNAPSHOT/search_data.json (original) +++ zeppelin/site/docs/0.8.0-SNAPSHOT/search_data.json Mon Apr 17 07:01:48 2017 @@ -26,8 +26,8 @@ "/development/writingzeppelinapplication.html": { - "title": "Writing a new Application(Experimental)", - "content" : "!--Licensed under the Apache License, Version 2.0 (the License);you may not use this file except in compliance with the License.You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an AS IS BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.--Writing a new Application (Experimental)What is Apache Zeppelin ApplicationApache Zeppelin Application is a package that runs on Interpreter process and displays it#39;s output inside of the notebook. While application runs on Interpreter process, it#39;s able to access resources provided by Interpreter through ResourcePool. Output is always rendered by AngularDisplaySystem. Therefore application provides all the possibli ties of making interactive graphical application that uses data and processing power of any Interpreter.Make your own ApplicationWriting Application means extending org.apache.zeppelin.helium.Application. You can use your favorite IDE and language while Java class files are packaged into jar. Application class looks like/** * Constructor. Invoked when application is loaded */public Application(ApplicationContext context);/** * Invoked when there#39;re (possible) updates in required resource set. * i.e. invoked after application load and after paragraph finishes. */public abstract void run(ResourceSet args);/** * Invoked before application unload. * Application is automatically unloaded with paragraph/notebook removal */public abstract void unload();You can check example applications under ./zeppelin-examples directory.Development modeIn the development mode, you can run your Application in your IDE as a normal java application and see the result inside of Zeppelin notebook.org. apache.zeppelin.helium.ZeppelinApplicationDevServer can run Zeppelin Application in development mode.// entry point for development modepublic static void main(String[] args) throws Exception { // add resources for development mode LocalResourcePool pool = new LocalResourcePool(quot;devquot;); pool.put(quot;datequot;, new Date()); // run application in devlopment mode with given resource // in this case, Clock.class.getName() will be the application class name org.apache.zeppelin.helium.ZeppelinApplicationDevServer devServer = new org.apache.zeppelin.helium.ZeppelinApplicationDevServer( Clock.class.getName(), pool.getAll()); // start development mode devServer.start(); devServer.join();}In the Zeppelin notebook, run %dev run will connect to application running in development mode.Package filePackage file is a json file that provides information about the application.Json file contains the following information{ name : quot;[organization].[name ]quot;, description : quot;Descriptionquot;, artifact : quot;groupId:artifactId:versionquot;, className : quot;your.package.name.YourApplicationClassquot;, resources : [ [quot;resource.namequot;, quot;:resource.class.namequot;], [quot;alternative.resource.namequot;, quot;:alternative.class.namequot;] ], icon : quot;lt;i class=quot;iconquot;gt;lt;/igt;quot;}nameName is a string in [group].[name]
svn commit: r1791664 [2/5] - in /zeppelin/site/docs/0.8.0-SNAPSHOT: ./ development/ displaysystem/ install/ interpreter/ manual/ quickstart/ rest-api/ security/ storage/
Added: zeppelin/site/docs/0.8.0-SNAPSHOT/development/writingzeppelinvisualization_transformation.html URL: http://svn.apache.org/viewvc/zeppelin/site/docs/0.8.0-SNAPSHOT/development/writingzeppelinvisualization_transformation.html?rev=1791664=auto == --- zeppelin/site/docs/0.8.0-SNAPSHOT/development/writingzeppelinvisualization_transformation.html (added) +++ zeppelin/site/docs/0.8.0-SNAPSHOT/development/writingzeppelinvisualization_transformation.html Mon Apr 17 07:01:48 2017 @@ -0,0 +1,615 @@ + + + + + +Apache Zeppelin 0.8.0-SNAPSHOT Documentation: Transformations for Zeppelin Visualization + + + + + + + + + + + + + + + + + + + +https://code.jquery.com/jquery-1.10.2.min.js"> + + + + + + + + + + + + + + + + + + +Toggle navigation + + + + + +http://zeppelin.apache.org;> + + Zeppelin + + + 0.8.0-SNAPSHOT + + + + + + + Quick Start + +What is Apache Zeppelin ? + +Getting Started +Install +Configuration +Explore Zeppelin UI +Tutorial + +Basic Feature Guide +Dynamic Form +Publish your Paragraph +Customize Zeppelin Homepage + +More +Upgrade Zeppelin Version +Build from source +Install Zeppelin with Flink and Spark Clusters Tutorial + + + + Interpreter + +Overview + +Usage +Interpreter Installation + +Interpreter Dependency Management +Interpreter User Impersonation +Interpreter Execution Hooks (Experimental) + +Available Interpreters +Alluxio +Beam +BigQuery +Cassandra +Elasticsearch +Flink +Geode +Groovy +HBase +HDFS +Hive +Ignite +JDBC +Kylin +Lens +Livy +Markdown +Pig +Python +Postgresql, HAWQ +R +Scalding +Scio +Shell +Spark + + + + Display System + +Basic Display System +Text +Html +Table + +Angular API +Angular (backend API) +Angular (frontend API) + + + + More + +Notebook Storage +Git Storage +S3 Storage +Azure Storage +ZeppelinHub Storage +MongoDB Storage + +REST API +Interpreter API +Notebook API +Notebook Repository API +Configuration API +Credential API +Helium API + +Security +Shiro Authentication +Notebook Authorization +Data Source Authorization + +Helium Framework (Experimental) +Writing Zeppelin Application +Writing Zeppelin Spell +Writing Zeppelin Visualization: Basics +Writing Zeppelin Visualization: Transformation + +Advanced +Zeppelin on Vagrant VM +Zeppelin on Spark Cluster Mode (Standalone) +Zeppelin on Spark Cluster Mode (YARN) +Zeppelin on Spark Cluster Mode (Mesos) +Zeppelin on CDH + +Contibute +Writing Zeppelin Interpreter +How to contribute (code) +How to contribute (website) + + + + + + + + + + + + + + + + + + + + + +Transformations for Zeppelin Visualization + + + +Overview + +Transformations + + +renders setting which allows
zeppelin git commit: [DOC] Improve documents related to Helium
Repository: zeppelin Updated Branches: refs/heads/master 4d398ef2a -> be2020123 [DOC] Improve documents related to Helium ### What is this PR for? What I did for the documents: * Highlight codes * Follow JSON syntax * Remove white spaces And in my opinion, [here](https://zeppelin.apache.org/docs/0.8.0-SNAPSHOT/development/writingzeppelinvisualization.html#1-create-a-npm-package) is ambiguous: > "Normally, you can add any dependencies in package.json however Zeppelin > Visualization package only allows two dependencies: zeppelin-vis and > zeppelin-tabledata." Does it want to say "you can add any dependencies in package.json, but you must include two dependencies: zeppelin-vis and zeppelin-tabledata."? ### What type of PR is it? [Documentation] ### Questions: * Does the licenses files need update? NO * Is there breaking changes for older versions? NO * Does this needs documentation? NO Author: Jun KimCloses #2236 from tae-jun/helium-doc and squashes the following commits: 63505e9 [Jun Kim] Fix ambiguous sentence 3e775cf [Jun Kim] Highlight codes, follow JSON syntax, and remove white spaces Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/be202012 Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/be202012 Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/be202012 Branch: refs/heads/master Commit: be20201236758dbba256f6480c5c2f8b91a86ae9 Parents: 4d398ef Author: Jun Kim Authored: Mon Apr 10 19:07:40 2017 +0900 Committer: ahyoungryu Committed: Mon Apr 17 15:57:31 2017 +0900 -- docs/development/writingzeppelinapplication.md | 16 docs/development/writingzeppelinspell.md| 40 ++-- .../development/writingzeppelinvisualization.md | 30 +++ 3 files changed, 42 insertions(+), 44 deletions(-) -- http://git-wip-us.apache.org/repos/asf/zeppelin/blob/be202012/docs/development/writingzeppelinapplication.md -- diff --git a/docs/development/writingzeppelinapplication.md b/docs/development/writingzeppelinapplication.md index 59f980a..265efcf 100644 --- a/docs/development/writingzeppelinapplication.md +++ b/docs/development/writingzeppelinapplication.md @@ -91,19 +91,18 @@ In the Zeppelin notebook, run `%dev run` will connect to application running in Package file is a json file that provides information about the application. Json file contains the following information -``` +```json { - name : "[organization].[name]", - description : "Description", - artifact : "groupId:artifactId:version", - className : "your.package.name.YourApplicationClass", - resources : [ + "name" : "[organization].[name]", + "description" : "Description", + "artifact" : "groupId:artifactId:version", + "className" : "your.package.name.YourApplicationClass", + "resources" : [ ["resource.name", ":resource.class.name"], ["alternative.resource.name", ":alternative.class.name"] ], - icon : "" + "icon" : "" } - ``` name @@ -184,4 +183,3 @@ e.g. ``` icon: "" ``` - http://git-wip-us.apache.org/repos/asf/zeppelin/blob/be202012/docs/development/writingzeppelinspell.md -- diff --git a/docs/development/writingzeppelinspell.md b/docs/development/writingzeppelinspell.md index 1eefe83..6393b18 100644 --- a/docs/development/writingzeppelinspell.md +++ b/docs/development/writingzeppelinspell.md @@ -23,12 +23,12 @@ limitations under the License. -## What is Apache Zeppelin Spell +## What is Apache Zeppelin Spell -Spell is a kind of interpreter that runs on browser not on backend. So, technically it's the frontend interpreter. +Spell is a kind of interpreter that runs on browser not on backend. So, technically it's the frontend interpreter. It can provide many benefits. -- Spell is pluggable frontend interpreter. So it can be installed and removed easily using helium registry. +- Spell is pluggable frontend interpreter. So it can be installed and removed easily using helium registry. - Every spell is written in javascript. It means you can use existing javascript libraries whatever you want. - Spell runs on browser like display system (`%html`, `%table`). In other words, every spell can be used as display system as well. @@ -57,7 +57,7 @@ For example, Use `%echo` for the Echo Spell. -## Write a new Spell +## Write a new Spell Making a new spell is similar to [Helium Visualization#write-new-visualization](./writingzeppelinvisualization.html#write-new-visualization). @@ -67,14 +67,14 @@ Making a new spell is similar to [Helium Visualization#write-new-visualization]( ### 1. Create a npm package