You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by GitBox <gi...@apache.org> on 2019/02/26 09:18:30 UTC

[GitHub] liuxunorg opened a new pull request #3314: [ZEPPELIN-4019] Interpreter process get the note from zeppelin server

liuxunorg opened a new pull request #3314: [ZEPPELIN-4019] Interpreter process get the note from zeppelin server
URL: https://github.com/apache/zeppelin/pull/3314
 
 
   ### What is this PR for?
   The interpreter is executed according to the paragraph. Click the run button in the paragraph, and only the code content in the current paragraph can be obtained in the interpreter process.
   
   To pass the Dashboard paragraph in the submarine interpreter, you need to submit all the code content in this note to tensorflow for execution.
   
   So, I think need to get the note data in sever through `RemoteInterpreterEventServer` in the interpreter process.
   
   I implemented two other methods, so that the interpreter can get the note in the server, the actual running effect is not the best solution.
   
   **1) By having the interpreter directly access the external storage of the note repository, such as HDFS, S3.**
   
   1. But this limits the need to store notes in an external storage system.
   2. In hdfs with kerberos authentication system enabled, not all users can access the note folder.
   
   **2) Get the note from the server from the REST client in the interpreter.**
   
   1. Need to let zeppelin/api/notes intercept in shrio.ini.
   2. Or let the interpreter access the REST interface of the server through the user and password, but it is not safe.
   
   In addition, in [JIRA-4018](https://issues.apache.org/jira/browse/ZEPPELIN-4018) Workflow and orchestration, it is also necessary to query all the notes and paragraphs of the user in the workflow paragraph for the execution of the note.
   
   ### What type of PR is it?
   [Improvement]
   
   ### Todos
   * [ ] - Task
   
   ### What is the Jira issue?
   * https://issues.apache.org/jira/browse/ZEPPELIN-4019
   
   ### How should this be tested?
   ShellInterpreter::internalInterpret(String cmd, InterpreterContext contextInterpreter)
   ```
   String noteJson = contextInterpreter.getIntpEventClient().getNoteFromServer(
       cmd,
       contextInterpreter.getAuthenticationInfo(), true);
   if (null != noteJson) {
     LOGGER.info(noteJson);
     return new InterpreterResult(Code.SUCCESS, noteJson);
   }
   
   return new InterpreterResult(Code.ERROR, "can not get note :" + cmd);
   ```
   
   ### Screenshots (if appropriate)
   ![getnotefromserver](https://user-images.githubusercontent.com/3677382/53401050-088b7b00-39ea-11e9-9f12-caee4d194fac.gif)
   
   
   [CI pass](https://travis-ci.org/liuxunorg/zeppelin/builds/498581356)
   
   * Does the licenses files need update? No
   * Is there breaking changes for older versions? No
   * Does this needs documentation? No

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services