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 2021/08/27 07:29:53 UTC

[GitHub] [zeppelin] Reamer opened a new pull request #4210: [ZEPPELIN-5501] Interpreter shade

Reamer opened a new pull request #4210:
URL: https://github.com/apache/zeppelin/pull/4210


   ### What is this PR for?
   This PR should fix the incorrect use of the interpreter shade and resolve the confusion of IDEs.
   
   ### What type of PR is it?
    - Improvement
   
   ### Todos
   * [ ] - cleanup
   * [ ] - new maven-shade-plugin
   * [ ] - documentation, How to use this with intellij
   
   ### What is the Jira issue?
   * https://issues.apache.org/jira/browse/ZEPPELIN-5501
   
   ### How should this be tested?
   * CI
   
   ### Questions:
   * Does the licenses files need update? No
   * Is there breaking changes for older versions? No
   * Does this needs documentation? Yes
   


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zeppelin] zjffdu commented on a change in pull request #4210: [ZEPPELIN-5501] Interpreter shade

Posted by GitBox <gi...@apache.org>.
zjffdu commented on a change in pull request #4210:
URL: https://github.com/apache/zeppelin/pull/4210#discussion_r697226217



##########
File path: zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java
##########
@@ -16,10 +16,9 @@
  */
 package org.apache.zeppelin.socket;
 
-import com.google.common.base.Strings;
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
-import com.google.gson.reflect.TypeToken;
+import shaded.com.google.gson.Gson;
+import shaded.com.google.gson.GsonBuilder;
+import shaded.com.google.gson.reflect.TypeToken;

Review comment:
       Why use shaded class in zeppelin-server ? The reason we introduce  `zeppelin-interpreter-shaded` is to avoid conflict between `zeppelin-interpreter` and other third party dependencies used by specific interpreter (e.g. zeppelin-interpreter's dependencies conflicts with spark's dependencies). There should be no jar conflict issue in zeppelin server process, so seems no necessary to use shaded class in zeppelin-server. 




-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zeppelin] Reamer commented on a change in pull request #4210: [ZEPPELIN-5501] Interpreter shade

Posted by GitBox <gi...@apache.org>.
Reamer commented on a change in pull request #4210:
URL: https://github.com/apache/zeppelin/pull/4210#discussion_r705422303



##########
File path: zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java
##########
@@ -16,10 +16,9 @@
  */
 package org.apache.zeppelin.socket;
 
-import com.google.common.base.Strings;
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
-import com.google.gson.reflect.TypeToken;
+import shaded.com.google.gson.Gson;
+import shaded.com.google.gson.GsonBuilder;
+import shaded.com.google.gson.reflect.TypeToken;

Review comment:
       You are right. Perhaps I was a bit too hasty.
   More generally, I see a problem with the Guava lib, which exists as a transitive dependency in different versions. That's why I opened #4217.




-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zeppelin] Reamer commented on a change in pull request #4210: [ZEPPELIN-5501] Interpreter shade

Posted by GitBox <gi...@apache.org>.
Reamer commented on a change in pull request #4210:
URL: https://github.com/apache/zeppelin/pull/4210#discussion_r705464590



##########
File path: zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java
##########
@@ -16,10 +16,9 @@
  */
 package org.apache.zeppelin.socket;
 
-import com.google.common.base.Strings;
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
-import com.google.gson.reflect.TypeToken;
+import shaded.com.google.gson.Gson;
+import shaded.com.google.gson.GsonBuilder;
+import shaded.com.google.gson.reflect.TypeToken;

Review comment:
       We need to use the shaded GSON class at this point because `Input.TypeAdapterFactory` is part of the Zeppelin interpreter.
   `Input.TypeAdapterFactory` uses the shaded GSON from the Zeppelin server's point of view.
   Without this change you get the following compilation warning.
   ```
   [ERROR] /home/pdallig/git/zeppelin/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java:[139,40] incompatible types: org.apache.zeppelin.display.RuntimeTypeAdapterFactory cannot be converted to com.google.gson.TypeAdapterFactory
   [ERROR] /home/pdallig/git/zeppelin/zeppelin-server/src/main/java/org/apache/zeppelin/socket/ConnectionManager.java:[64,40] incompatible types: org.apache.zeppelin.display.RuntimeTypeAdapterFactory cannot be converted to com.google.gson.TypeAdapterFactory
   ```
   




-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org