Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Currently, Zeppelin uses <aws.sdk.s3.version>1.10.77</aws.sdk.s3.version> that imports a JSON library that Amazon deprecated in subsequent releases:
Amazon moved to Jackson JSON parser:
Dropped usage of Json.org library in favor of Jackson.
https://aws.amazon.com/releasenotes/aws-sdk-for-java-1-11-0/
Importing some other libraries in Zeppelin that use a higher version of the AWS SDK leads to a compile error (see below).
Amazon recommends:
If a project has the combination of a version clash and a limited total project size (e.g., AWS Lambda limits package size to 50MB), the bundled dependency might not be the right solution. Instead, you can build your own version of the AWS SDK for Java from the open sourced code on GitHub.
https://aws.amazon.com/blogs/developer/java-sdk-bundle/
It might not be convenient to manage an extra version of the SDK for Zeppelin.
Concerned code is in org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/ZeppelinhubClient.java, runAllParagraph)
Short-term solution
Replace
import com.amazonaws.util.json.JSONObject; import com.amazonaws.util.json.JSONArray; import com.amazonaws.util.json.JSONException;
with
import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject;
Better solution:
Move to Jackson and bump up the Amazon AWS SDK version to 1.11.x
Compile error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project zeppelin-zengine: Compilation failure: Compilation failure: [ERROR] /Users/armin/git/zeppelin/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/ZeppelinhubClient.java:[47,31] cannot find symbol [ERROR] symbol: class JSONArray [ERROR] location: package com.amazonaws.util.json [ERROR] /Users/armin/git/zeppelin/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/ZeppelinhubClient.java:[48,31] cannot find symbol [ERROR] symbol: class JSONException [ERROR] location: package com.amazonaws.util.json [ERROR] /Users/armin/git/zeppelin/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/websocket/ZeppelinhubClient.java:[49,31] cannot find symbol [ERROR] symbol: class JSONObject [ERROR] location: package com.amazonaws.util.json
Attachments
Issue Links
- links to