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 2020/04/10 15:35:11 UTC

[GitHub] [zeppelin] liuxunorg opened a new pull request #3732: ZEPPELIN-4747. Terminal interpreter support internal and external IP mapping

liuxunorg opened a new pull request #3732: ZEPPELIN-4747. Terminal interpreter support internal and external IP mapping
URL: https://github.com/apache/zeppelin/pull/3732
 
 
   ### What is this PR for?
   When running the terminal interpreter in the notebook, the front end of the notebook needs to obtain the IP address of the server where the terminal interpreter is located to communicate.
   
   In a public cloud environment, the cloud host has an internal IP and an external access IP, and the interpreter runs in the cloud host. This will cause the notebook front end to be unable to connect to the terminal interpreter properly, resulting in the terminal interpreter being unusable.
   
   Solution: Set the mapping between internal IP and external IP in the terminal interpreter, and connect the front end of the notebook through the external IP of the terminal interpreter.
   
   
   ### What type of PR is it?
   [Improvement]
   
   
   ### What is the Jira issue?
   * https://jira.apache.org/jira/browse/ZEPPELIN-4747
   
   ### How should this be tested?
   * First time? Setup Travis CI as described on https://zeppelin.apache.org/contribution/contributions.html#continuous-integration
   * Strongly recommended: add automated unit tests for any new or changed behavior
   * Outline any manual steps to test the PR here.
   
   ### Screenshots (if appropriate)
   
   ### Questions:
   * Does the licenses files need update?
   * Is there breaking changes for older versions?
   * Does this needs documentation?
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

[GitHub] [zeppelin] zjffdu commented on a change in pull request #3732: ZEPPELIN-4747. Terminal interpreter support internal and external IP mapping

Posted by GitBox <gi...@apache.org>.
zjffdu commented on a change in pull request #3732: ZEPPELIN-4747. Terminal interpreter support internal and external IP mapping
URL: https://github.com/apache/zeppelin/pull/3732#discussion_r407024591
 
 

 ##########
 File path: shell/src/main/java/org/apache/zeppelin/shell/TerminalInterpreter.java
 ##########
 @@ -123,6 +129,13 @@ public InterpreterResult internalInterpret(String cmd, InterpreterContext contex
       }
     }
     setParagraphConfig();
+    Properties properties = getProperties();
+    String strIpMapping = properties.getProperty("zeppelin.terminal.ip.mapping");
+    if (!StringUtils.isEmpty(strIpMapping)) {
+      Gson gson = new Gson();
 
 Review comment:
   gson could be a static variable so that we don't need to create it for each call.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

[GitHub] [zeppelin] liuxunorg commented on issue #3732: ZEPPELIN-4747. Terminal interpreter support internal and external IP mapping

Posted by GitBox <gi...@apache.org>.
liuxunorg commented on issue #3732: ZEPPELIN-4747. Terminal interpreter support internal and external IP mapping
URL: https://github.com/apache/zeppelin/pull/3732#issuecomment-612599090
 
 
   Will merge if no more comments.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

[GitHub] [zeppelin] liuxunorg commented on issue #3732: ZEPPELIN-4747. Terminal interpreter support internal and external IP mapping

Posted by GitBox <gi...@apache.org>.
liuxunorg commented on issue #3732: ZEPPELIN-4747. Terminal interpreter support internal and external IP mapping
URL: https://github.com/apache/zeppelin/pull/3732#issuecomment-612597486
 
 
   [travis ci passed](https://travis-ci.org/github/liuxunorg/zeppelin/builds/674000375)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

[GitHub] [zeppelin] zjffdu commented on issue #3732: ZEPPELIN-4747. Terminal interpreter support internal and external IP mapping

Posted by GitBox <gi...@apache.org>.
zjffdu commented on issue #3732: ZEPPELIN-4747. Terminal interpreter support internal and external IP mapping
URL: https://github.com/apache/zeppelin/pull/3732#issuecomment-612580872
 
 
   LGTM,thanks @liuxunorg Could you rebase this PR ? One flaky test failure is just fixed in master

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

[GitHub] [zeppelin] asfgit closed pull request #3732: ZEPPELIN-4747. Terminal interpreter support internal and external IP mapping

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #3732: ZEPPELIN-4747. Terminal interpreter support internal and external IP mapping
URL: https://github.com/apache/zeppelin/pull/3732
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

[GitHub] [zeppelin] liuxunorg commented on issue #3732: ZEPPELIN-4747. Terminal interpreter support internal and external IP mapping

Posted by GitBox <gi...@apache.org>.
liuxunorg commented on issue #3732: ZEPPELIN-4747. Terminal interpreter support internal and external IP mapping
URL: https://github.com/apache/zeppelin/pull/3732#issuecomment-612384706
 
 
   @zjffdu I fixed the issue in the comments. Please help review again.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

[GitHub] [zeppelin] zjffdu commented on a change in pull request #3732: ZEPPELIN-4747. Terminal interpreter support internal and external IP mapping

Posted by GitBox <gi...@apache.org>.
zjffdu commented on a change in pull request #3732: ZEPPELIN-4747. Terminal interpreter support internal and external IP mapping
URL: https://github.com/apache/zeppelin/pull/3732#discussion_r407024480
 
 

 ##########
 File path: docs/interpreter/shell.md
 ##########
 @@ -129,3 +129,30 @@ input any char
 ```
 
 <img src="{{BASE_PATH}}/assets/themes/zeppelin/img/docs-img/shell-terminal.gif" />
+
+## Configuration
+At the "Interpreters" menu in Zeppelin dropdown menu, you can set the property value for Terminal interpreter.
+
+<table class="table-configuration">
+  <tr>
+    <th>Name</th>
+    <th>Default</th>
+    <th>Description</th>
+  </tr>
+  <tr>
+    <td>zeppelin.terminal.ip.mapping</td>
+    <td></td>
+    <td>Internal and external IP mapping of zeppelin server</td>
+  </tr>
+</table>
 
 Review comment:
   It's better to merge this with other configurations

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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