zeppelin
zeppelin copied to clipboard
[ZEPPELIN-5206] JDK 11 Support
What is this PR for?
Upgrade java version to 11. Recently, lots of newest languages and framework decide not to support JDK 8. This is a draft PR. If you build Zeppelin using $ ./mvnw clean package -DskipTests -Phadoop2, you can see that build is success, but if you try to run Zeppelin, there's some error in process and dead.
error message
Exception in thread "main" MultiException stack 1 of 2 java.io.IOException: Failed to create new IndexWriter at org.apache.zeppelin.search.LuceneSearch.<init>(LuceneSearch.java:104) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.glassfish.hk2.utilities.reflection.ReflectionHelper.makeMe(ReflectionHelper.java:1356) at org.jvnet.hk2.internal.ClazzCreator.createMe(ClazzCreator.java:248) at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:342) at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:463) at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:59) at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:47) at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture$1.call(Cache.java:74) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture.run(Cache.java:131) at org.glassfish.hk2.utilities.cache.Cache.compute(Cache.java:176) at org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:98) at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2102) at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93) at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:67) at org.glassfish.hk2.utilities.ServiceLocatorUtilities.getService(ServiceLocatorUtilities.java:669) at org.apache.zeppelin.server.ZeppelinServer.main(ZeppelinServer.java:259) Caused by: org.apache.lucene.store.LockObtainFailedException: Lock held by another program: /private/tmp/zeppelin-index/write.lock at org.apache.lucene.store.NativeFSLockFactory.obtainFSLock(NativeFSLockFactory.java:130) at org.apache.lucene.store.FSLockFactory.obtainLock(FSLockFactory.java:41) at org.apache.lucene.store.BaseDirectory.obtainLock(BaseDirectory.java:45) at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:923) at org.apache.zeppelin.search.LuceneSearch.<init>(LuceneSearch.java:102) ... 20 more MultiException stack 2 of 2 java.lang.IllegalStateException: Unable to perform operation: create on org.apache.zeppelin.search.LuceneSearch at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:369) at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:463) at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:59) at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:47) at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture$1.call(Cache.java:74) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture.run(Cache.java:131) at org.glassfish.hk2.utilities.cache.Cache.compute(Cache.java:176) at org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:98) at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2102) at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93) at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:67) at org.glassfish.hk2.utilities.ServiceLocatorUtilities.getService(ServiceLocatorUtilities.java:669) at org.apache.zeppelin.server.ZeppelinServer.main(ZeppelinServer.java:259)
ZEPPELIN_CLASSPATH: :/Users/will/Develop/zeppelin_11/zeppelin/zeppelin-server/target/lib/*:/Users/will/Develop/zeppelin_11/zeppelin/zeppelin-zengine/target/lib/*:/Users/will/Develop/zeppelin_11/zeppelin/*::/Users/will/Develop/zeppelin_11/zeppelin/conf:/Users/will/Develop/zeppelin_11/zeppelin/zeppelin-interpreter/target/classes:/Users/will/Develop/zeppelin_11/zeppelin/zeppelin-zengine/target/classes:/Users/will/Develop/zeppelin_11/zeppelin/zeppelin-server/target/classes Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/zeppelin/server/ZeppelinServer has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:756) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:468) at java.net.URLClassLoader.access$100(URLClassLoader.java:74) at java.net.URLClassLoader$1.run(URLClassLoader.java:369) at java.net.URLClassLoader$1.run(URLClassLoader.java:363) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:362) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:601)
What type of PR is it?
Improvement
Todos
- [x] - Change/Remove/Add Dependency which supports Java 11
- [ ] - Fix the error during running Zeppelin.
What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-5821
How should this be tested?
CI and maybe we have to add more CI
Questions:
- Does the licenses files need to update? Yes
- Is there breaking changes for older versions? Yes
- Does this needs documentation? Yes
Hello and thank you for working on this important task. I've cleaned up a bit in Jira, please adjust your Jira issue.
I have also played around a bit with JDK 11. Maybe this will help you. https://github.com/Reamer/zeppelin/tree/jdk11
I've cleaned up a bit in Jira, please adjust your Jira issue.
I checked it and changed Jira issue number to 5206.
I have also played around a bit with JDK 11. Maybe this will help you. https://github.com/Reamer/zeppelin/tree/jdk11
Thanks ! :) I'll pull your repository and try to fix errors during build.
In the last few days I've been very active working on the branch, as the connection libraries for Spark with JDK-8 are slowly breaking away. Currently, the JDK-11 branch is running in my test environment. Let's see what kind of issues come up.
In the next few days, I'll try to split the changes into several pull requests.
In the next few days, I'll try to split the changes into several pull requests.
That's great news! Then I'll close this draft pr and check the PR that you'll make =)