-
Notifications
You must be signed in to change notification settings - Fork 4.8k
HIVE-29130: Remove jline 2.x #6054
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
As Hadoop has jline 3.9.0**, in my setup** it was getting picked first compared to 3.25.0 from hive. Causing NoSuchMethodError org.jline.reader.EndOfFileException#getPartialLine() check here. I would like the reviewer to confirm on this. |
8c93883
to
ca3d41d
Compare
thanks @Aggarwal-Raghav for taking care of this, would you be so kind to add an enforcer item so ban this dependency even transitively in the future? that would be the perfect solution I believe |
sure. Will update the PR. |
ca3d41d
to
180afc3
Compare
@@ -48,8 +48,7 @@ | |||
<include>org.apache.hive:hive-service-rpc:jar</include> | |||
<include>commons-cli:commons-cli:jar</include> | |||
<include>commons-io:commons-io:jar</include> | |||
<include>commons-logging:commons-logging:jar</include> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removing commons-logging as it was getting packaged in beeline tarball. Check HIVE-24691 and HIVE-20019
@@ -48,8 +48,7 @@ | |||
<include>org.apache.hive:hive-service-rpc:jar</include> | |||
<include>commons-cli:commons-cli:jar</include> | |||
<include>commons-io:commons-io:jar</include> | |||
<include>commons-logging:commons-logging:jar</include> | |||
<include>jline:jline:jar</include> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved it to jline3.x groupId
<goals> | ||
<goal>enforce</goal> | ||
</goals> | ||
<configuration> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed the enforcer pluging from standalone-metastore/metastore-common/pom.xml
and standalone-metastore/metastore-server/pom.xml
and moved to standalone-metastore/pom.xml
i.e. a common place and updated it with the same list of banned dependency as in parent pom.xml
- jline2.x has been added to enforcer plugin - commons-logging direct dependency has been removed from standalone-metastore module - enforcer plugin in standalone-metastore is now same as of parent pom.xml
180afc3
to
c07490a
Compare
My recommendation for the next step is to remove the jline enforcer rule from the parent pom.xml, keeping the exclusions everywhere else except CC @abstractdog |
Hadoop's JLine 3.9.0 it was getting picked up first. So, we should make sure Hive Classpath is always before HADOOP jars. I don't understand in that scope or for this problem why are we playing with Jline-2.x? I am not very convinced on enforcing some places and not on some. We might not have a use case or expertise with Pig, so better not to touch it in that case. We had a thread around Pig to depreacate/remove some time back & we were shot down, so people tend to use it Why not upgrade JLine in Hadoop? |
it is what it is, thanks @Aggarwal-Raghav for checking, but before proceeding with this, can you please check if there is an include/exclude possibility in bannedDependencies to allow old jline transitively through pig only, does it make sense? |
Thanks for the reply @ayushtkn.
In hive packaging, both jline 2.11 and jline 3.25.0 are getting shipped. IMO, its wrong. The aim of this PR is to ship only jline3.x jar. If we are ok shipping both the version then I'll close this PR.
It's good to have same dependency version across components. In my setup, Jline 3.9.0 is getting picked up first which is causing NoSuchMethodError. -- I want to confirm if its due to my setup or not. In conclusion,
|
So, the solution is like in ideal setup Hive Classpath should be first. In that case we are sorted. Else for the problem that you reported. Hadoop needs to upgrade JLine, correct? And this PR is solving a different problem as reported in the ticket, this won't solve the problem that you reported? |
yes and yes.
|
we can use
2. Do it on hcatalog/hcatalog-pig-adapter/pom.xml level: include-tag-child-pom.patch
@abstractdog , please let me know which is better. |
I would go for 1), I don't like the whole copied enforcer plugin config in 2), thanks a lot for investigating all the possibilities! |
UT passed in local.
Pushed the changes. Will see CI output. |
<exclude>jline:jline</exclude> | ||
</excludes> | ||
<includes> | ||
<include>jline:jline:1.0</include> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: please explain here with a brief comment why we still allow 1.0 to make it clear for the future if we can remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
thanks @Aggarwal-Raghav, I'm good now with the pom.xml changes, but haven't followed if you've reached consensus with @ayushtkn on the other aspect of this PR, please let me know guys |
@ayushtkn, can you please take a look once! |
bf62265
to
9f3d5d3
Compare
|
gentle ping for review @ayushtkn ! |
Stuck with some stuff. If @abstractdog is happy. I am happy. feel free to move ahead :-) |
What changes were proposed in this pull request?
Although Hive has moved to Jline3, 2.x was also getting shipped in packaging.
Why are the changes needed?
To have single Jline jar. Check HIVE-29130 for more details
Does this PR introduce any user-facing change?
No
How was this patch tested?
On local setup