Skip to content

HBASE-28557 Upgrade JLine to 3.30.17 - #8930

Merged
taklwu merged 2 commits into
apache:masterfrom
PDavid:HBASE-28557-jline
Nov 24, 2026
Merged

taklwu merged 2 commits into
apache:masterfrom
PDavid:HBASE-28557-jline

Conversation

@PDavid

@PDavid PDavid commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Motivation: JLine 2.x is EOL, ZooKeeper 3.8.6 also already uses JLine 3.x (See ZOOKEEPER-3938).

In JLine 3.x the groupId is changed from "jline" to "org.jline".

Made sure we don't copy jline jar multiple times to the lib directory of the tarballs.

Updated supplemental-models.xml as we directly depend on jline not just getting it from hadoop-3.3.0 anymore.

Use jdk8 classifier of JLine so our build doesn't pull in Java 22+ bytecode from the FFM (Foreign Function & Memory) terminal provider.

Motivation: JLine 2.x is EOL, ZooKeeper 3.8.6 also already uses JLine 3.x (See ZOOKEEPER-3938).

In JLine 3.x the groupId is changed from "jline" to "org.jline".

Made sure we don't copy jline jar multiple times to the lib directory of the tarballs.

Updated supplemental-models.xml as we directly depend on jline not just getting it from hadoop-3.3.0 anymore.
@PDavid PDavid self-assigned this Nov 24, 2026
@PDavid PDavid added the dependencies Pull requests that update a dependency file label Nov 24, 2026
@PDavid

PDavid commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Verification

Build with mvn clean install -DskipTests is successful locally.

Tests in hbase-zookeeper are successful:

$ mvn test -pl hbase-zookeeper
...
[INFO] Results:
[INFO] 
[INFO] Tests run: 33, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  25.506 s
[INFO] Finished at: 2026-11-24T13:49:40+01:00
[INFO] ------------------------------------------------------------------------
$

Built the tarballs and made sure jline jar is not duplicated in lib directory.

$ mvn clean install -DskipTests && mvn install assembly:single -DskipTests -Dcheckstyle.skip=true -Drat.skip=true

...


$ for t in hbase-assembly/target/*-bin.tar.gz hbase-assembly-byo-hadoop/target/*-bin.tar.gz; do
    echo "== $t"; tar tzf "$t" | grep -i jline
  done

== hbase-assembly/target/hbase-4.0.0-alpha-1-SNAPSHOT-bin.tar.gz
hbase-4.0.0-alpha-1-SNAPSHOT/lib/zkcli/jline-3.30.17.jar
== hbase-assembly/target/hbase-4.0.0-alpha-1-SNAPSHOT-client-bin.tar.gz
hbase-4.0.0-alpha-1-SNAPSHOT-client/lib/zkcli/jline-3.30.17.jar
== hbase-assembly-byo-hadoop/target/hbase-byo-hadoop-4.0.0-alpha-1-SNAPSHOT-bin.tar.gz
hbase-byo-hadoop-4.0.0-alpha-1-SNAPSHOT/lib/zkcli/jline-3.30.17.jar


-> jline-3.30.17.jar only exists once (in lib/zkcli) - OK

Unpacked the full tarball and ran bin/hbase zkcli against a port with no server listening:

$ bin/hbase zkcli -server 127.0.0.1:1
Connecting to 127.0.0.1:1
2026-11-24T13:44:04,000 INFO  [main] zookeeper.ZooKeeper: Client environment:zookeeper.version=3.8.6-6df26081269769c160c8c3a24929c60c91cd19c3, built on 2026-01-28 20:28 UTC
2026-11-24T13:44:04,002 INFO  [main] zookeeper.ZooKeeper: Client environment:host.name=FHTL1T3
2026-11-24T13:44:04,002 INFO  [main] zookeeper.ZooKeeper: Client environment:java.version=17.0.21.1
2026-11-24T13:44:04,002 INFO  [main] zookeeper.ZooKeeper: Client environment:java.vendor=Eclipse Adoptium
2026-11-24T13:44:04,002 INFO  [main] zookeeper.ZooKeeper: Client environment:java.home=/home/ws1test3/.sdkman/candidates/java/17.0.21.1+2-tem
2026-11-24T13:44:04,002 INFO  [main] zookeeper.ZooKeeper: e-4.0.0-alpha-1-SNAPSHOT/bin/../lib/client-facing-thirdparty/jul-to-slf4j-1.7.30.jar:/home/ws1test3/projects/upstream/hbase/hbase-assembly/target/hbase-4.0.0-alpha-1-SNAPSHOT-bin/hbase-4.0.0-alpha-1-SNAPSHOT/bin/../lib/client-facing-thirdparty/opentelemetry-api-1.49.0.jar:/home/ws1test3/projects/upstream/hbase/hbase-assembly/target/hbase-4.0.0-alpha-1-SNAPSHOT-bin/hbase-4.0.0-alpha-1-SNAPSHOT/bin/../lib/client-facing-thirdparty/opentelemetry-context-1.49.0.jar:/home/ws1test3/projects/upstream/hbase/hbase-assembly/target/hbase-4.0.0-alpha-1-SNAPSHOT-bin/hbase-4.0.0-alpha-1-SNAPSHOT/bin/../lib/client-facing-thirdparty/opentelemetry-semconv-1.29.0-alpha.jar:/home/ws1test3/projects/upstream/hbase/hbase-assembly/target/hbase-4.0.0-alpha-1-SNAPSHOT-bin/hbase-4.0.0-alpha-1-SNAPSHOT/bin/../lib/client-facing-thirdparty/slf4j-api-1.7.30.jar:/home/ws1test3/projects/upstream/hbase/hbase-assembly/target/hbase-4.0.0-alpha-1-SNAPSHOT-bin/hbase-4.0.0-alpha-1-SNAPSHOT/bin/../lib/zkcli/jline-3.30.17.jar
2026-11-24T13:44:04,002 INFO  [main] zookeeper.ZooKeeper: Client environment:java.library.path=/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
2026-11-24T13:44:04,003 INFO  [main] zookeeper.ZooKeeper: Client environment:java.io.tmpdir=/tmp
2026-11-24T13:44:04,003 INFO  [main] zookeeper.ZooKeeper: Client environment:java.compiler=<NA>
2026-11-24T13:44:04,003 INFO  [main] zookeeper.ZooKeeper: Client environment:os.name=Linux
2026-11-24T13:44:04,003 INFO  [main] zookeeper.ZooKeeper: Client environment:os.arch=amd64
2026-11-24T13:44:04,003 INFO  [main] zookeeper.ZooKeeper: Client environment:os.version=7.0.0-43-generic
2026-11-24T13:44:04,003 INFO  [main] zookeeper.ZooKeeper: Client environment:user.name=ws1test3
2026-11-24T13:44:04,003 INFO  [main] zookeeper.ZooKeeper: Client environment:user.home=/home/ws1test3
2026-11-24T13:44:04,003 INFO  [main] zookeeper.ZooKeeper: Client environment:user.dir=/home/ws1test3/projects/upstream/hbase/hbase-assembly/target/hbase-4.0.0-alpha-1-SNAPSHOT-bin/hbase-4.0.0-alpha-1-SNAPSHOT
2026-11-24T13:44:04,003 INFO  [main] zookeeper.ZooKeeper: Client environment:os.memory.free=963MB
2026-11-24T13:44:04,003 INFO  [main] zookeeper.ZooKeeper: Client environment:os.memory.max=16000MB
2026-11-24T13:44:04,003 INFO  [main] zookeeper.ZooKeeper: Client environment:os.memory.total=1016MB
2026-11-24T13:44:04,005 INFO  [main] zookeeper.ZooKeeper: Initiating client connection, connectString=127.0.0.1:1 sessionTimeout=30000 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@16eb3ea3
2026-11-24T13:44:04,008 INFO  [main] common.X509Util: Setting -D jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS renegotiation
2026-11-24T13:44:04,011 INFO  [main] zookeeper.ClientCnxnSocket: jute.maxbuffer value is 1048575 Bytes
2026-11-24T13:44:04,017 INFO  [main] zookeeper.ClientCnxn: zookeeper.request.timeout value is 0. feature enabled=false
Welcome to ZooKeeper!
JLine support is enabled
2026-11-24T13:44:04,023 INFO  [main-SendThread(127.0.0.1:1) {myid=127.0.0.1:1}] zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:1.
2026-11-24T13:44:04,023 INFO  [main-SendThread(127.0.0.1:1) {myid=127.0.0.1:1}] zookeeper.ClientCnxn: SASL config status: Will not attempt to authenticate using SASL (unknown error)
2026-11-24T13:44:04,032 WARN  [main-SendThread(127.0.0.1:1) {myid=127.0.0.1:1}] zookeeper.ClientCnxn: Session 0x0 for server localhost/127.0.0.1:1, Closing socket connection. Attempting reconnect except it is a SessionExpiredException.
java.net.ConnectException: Connection refused
	at java.base/sun.nio.ch.Net.pollConnect(Native Method)
	at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:684)
	at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:946)
	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:344)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1289)
[zk: 127.0.0.1:1(CONNECTING) 0] 2026-11-24T13:44:05,135 INFO  [main-SendThread(127.0.0.1:1) {myid=127.0.0.1:1}] zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:1.
2026-11-24T13:44:05,135 INFO  [main-SendThread(127.0.0.1:1) {myid=127.0.0.1:1}] zookeeper.ClientCnxn: SASL config status: Will not attempt to authenticate using SASL (unknown error)
2026-11-24T13:44:05,136 WARN  [main-SendThread(127.0.0.1:1) {myid=127.0.0.1:1}] zookeeper.ClientCnxn: Session 0x0 for server localhost/127.0.0.1:1, Closing socket connection. Attempting reconnect except it is a SessionExpiredException.
java.net.ConnectException: Connection refused
	at java.base/sun.nio.ch.Net.pollConnect(Native Method)
	at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:684)
	at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:946)
	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:344)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1289)
$

-> lib/zkcli/jline-3.30.17.jar was on the classpath and it printed:

Welcome to ZooKeeper!
JLine support is enabled

The "Connection refused" after that is expected, since nothing was listening.

Also verified this against a locally running standalone ZooKeeper:

# Go to Apache ZooKeeper git clone

$ cd zookeeper
$ mvn clean install -DskipTests
...
$ bin/zkServer.sh start                       
ZooKeeper JMX enabled by default
Using config: /home/ws1test3/projects/upstream/zookeeper/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED

# Go back to unpacked the full tarball

$ bin/hbase zkcli -server 127.0.0.1:2181 ls /
Connecting to 127.0.0.1:2181
2026-11-24T16:43:38,343 INFO  [main] zookeeper.ZooKeeper: Client environment:zookeeper.version=3.8.6-6df26081269769c160c8c3a24929c60c91cd19c3, built on 2026-01-28 20:28 UTC
2026-11-24T16:43:38,345 INFO  [main] zookeeper.ZooKeeper: Client environment:host.name=FHTL1T3
2026-11-24T16:43:38,345 INFO  [main] zookeeper.ZooKeeper: Client environment:java.version=17.0.21.1
2026-11-24T16:43:38,345 INFO  [main] zookeeper.ZooKeeper: Client environment:java.vendor=Eclipse Adoptium
2026-11-24T16:43:38,345 INFO  [main] zookeeper.ZooKeeper: Client environment:java.home=/home/ws1test3/.sdkman/candidates/java/17.0.21.1+2-tem
2026-11-24T16:43:38,345 INFO  [main] zookeeper.ZooKeeper: ha-1-SNAPSHOT-bin/hbase-4.0.0-alpha-1-SNAPSHOT/bin/../lib/client-facing-thirdparty/opentelemetry-api-1.49.0.jar:/home/ws1test3/projects/upstream/hbase/hbase-assembly/target/hbase-4.0.0-alpha-1-SNAPSHOT-bin/hbase-4.0.0-alpha-1-SNAPSHOT/bin/../lib/client-facing-thirdparty/opentelemetry-context-1.49.0.jar:/home/ws1test3/projects/upstream/hbase/hbase-assembly/target/hbase-4.0.0-alpha-1-SNAPSHOT-bin/hbase-4.0.0-alpha-1-SNAPSHOT/bin/../lib/client-facing-thirdparty/opentelemetry-semconv-1.29.0-alpha.jar:/home/ws1test3/projects/upstream/hbase/hbase-assembly/target/hbase-4.0.0-alpha-1-SNAPSHOT-bin/hbase-4.0.0-alpha-1-SNAPSHOT/bin/../lib/client-facing-thirdparty/slf4j-api-1.7.30.jar:/home/ws1test3/projects/upstream/hbase/hbase-assembly/target/hbase-4.0.0-alpha-1-SNAPSHOT-bin/hbase-4.0.0-alpha-1-SNAPSHOT/bin/../lib/zkcli/jline-3.30.17-jdk8.jar:/home/ws1test3/projects/upstream/hbase/hbase-assembly/target/hbase-4.0.0-alpha-1-SNAPSHOT-bin/hbase-4.0.0-alpha-1-SNAPSHOT/bin/../lib/zkcli/jline-3.9.0.jar
2026-11-24T16:43:38,345 INFO  [main] zookeeper.ZooKeeper: Client environment:java.library.path=/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
2026-11-24T16:43:38,345 INFO  [main] zookeeper.ZooKeeper: Client environment:java.io.tmpdir=/tmp
2026-11-24T16:43:38,345 INFO  [main] zookeeper.ZooKeeper: Client environment:java.compiler=<NA>
2026-11-24T16:43:38,345 INFO  [main] zookeeper.ZooKeeper: Client environment:os.name=Linux
2026-11-24T16:43:38,345 INFO  [main] zookeeper.ZooKeeper: Client environment:os.arch=amd64
2026-11-24T16:43:38,345 INFO  [main] zookeeper.ZooKeeper: Client environment:os.version=7.0.0-43-generic
2026-11-24T16:43:38,345 INFO  [main] zookeeper.ZooKeeper: Client environment:user.name=ws1test3
2026-11-24T16:43:38,345 INFO  [main] zookeeper.ZooKeeper: Client environment:user.home=/home/ws1test3
2026-11-24T16:43:38,345 INFO  [main] zookeeper.ZooKeeper: Client environment:user.dir=/home/ws1test3/projects/upstream/hbase/hbase-assembly/target/hbase-4.0.0-alpha-1-SNAPSHOT-bin/hbase-4.0.0-alpha-1-SNAPSHOT
2026-11-24T16:43:38,345 INFO  [main] zookeeper.ZooKeeper: Client environment:os.memory.free=963MB
2026-11-24T16:43:38,345 INFO  [main] zookeeper.ZooKeeper: Client environment:os.memory.max=16000MB
2026-11-24T16:43:38,345 INFO  [main] zookeeper.ZooKeeper: Client environment:os.memory.total=1016MB
2026-11-24T16:43:38,348 INFO  [main] zookeeper.ZooKeeper: Initiating client connection, connectString=127.0.0.1:2181 sessionTimeout=30000 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@402c4085
2026-11-24T16:43:38,350 INFO  [main] common.X509Util: Setting -D jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS renegotiation
2026-11-24T16:43:38,354 INFO  [main] zookeeper.ClientCnxnSocket: jute.maxbuffer value is 1048575 Bytes
2026-11-24T16:43:38,361 INFO  [main] zookeeper.ClientCnxn: zookeeper.request.timeout value is 0. feature enabled=false
2026-11-24T16:43:38,367 INFO  [main-SendThread(127.0.0.1:2181) {myid=127.0.0.1:2181}] zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181.
2026-11-24T16:43:38,367 INFO  [main-SendThread(127.0.0.1:2181) {myid=127.0.0.1:2181}] zookeeper.ClientCnxn: SASL config status: Will not attempt to authenticate using SASL (unknown error)
2026-11-24T16:43:38,372 INFO  [main-SendThread(127.0.0.1:2181) {myid=127.0.0.1:2181}] zookeeper.ClientCnxn: Socket connection established, initiating session, client: /127.0.0.1:40842, server: localhost/127.0.0.1:2181
2026-11-24T16:43:38,379 INFO  [main-SendThread(127.0.0.1:2181) {myid=127.0.0.1:2181}] zookeeper.ClientCnxn: Session establishment complete on server localhost/127.0.0.1:2181, session id = 0x10001cd1f210001, negotiated timeout = 30000

WATCHER::

WatchedEvent state:SyncConnected type:None path:null
[zk_test, zookeeper]
$

so our build doesn't pull in Java 22+ bytecode from the FFM (Foreign Function & Memory) terminal provider.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The license supplement retains the 2002–2018 copyright notice for version 3.30.17 instead of its 2002–2023 notice, causing incorrect attribution in the generated distribution LICENSE.txt.

1 open issue
What changed in this PR

Upgrades HBase’s JLine dependency from 2.11 to 3.30.17, replacing the end-of-life version and updating distribution packaging.

Changes:

  • Switches dependency coordinates to org.jline:jline with the jdk8 classifier to avoid Java 22+ FFM bytecode.
  • Updates assembly filters to place JLine in lib/zkcli without duplicating it in the main lib directory.
  • Updates supplemental license metadata for the new version.
File Description
pom.xml Manages JLine 3.30.17 with the jdk8 classifier.
hbase-resource-bundle/​src/​main/​resources/​supplemental-models.xml Updates JLine’s supplemental license version.
hbase-dev-generate-classpath/​pom.xml Uses the new dependency for development classpaths.
hbase-assembly/​src/​main/​assembly/​hadoop-three-compat.xml Updates JLine packaging filters for the Hadoop-compatible distribution.
hbase-assembly/​src/​main/​assembly/​client.xml Updates JLine packaging filters for the client distribution.
hbase-assembly/​pom.xml Switches the standard assembly to the new dependency.
hbase-assembly-byo-hadoop/​src/​main/​assembly/​hadoop-three-compat.xml Updates JLine packaging filters for the bring-your-own-Hadoop distribution.
hbase-assembly-byo-hadoop/​pom.xml Switches the bring-your-own-Hadoop assembly to the new dependency.

Review effort: Balanced

@taklwu taklwu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for making this upgrade

@kgeisz kgeisz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@taklwu
taklwu merged commit b5913a7 into apache:master Nov 24, 2026
12 of 13 checks passed
@PDavid
PDavid deleted the HBASE-28557-jline branch November 25, 2026 13:04
@PDavid

PDavid commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

Many thanks @kgeisz and @taklwu for your reviews and merging! 👍

PDavid added a commit that referenced this pull request Nov 25, 2026
Signed-off-by: Tak Lon (Stephen) Wu <taklwu@apache.org>
Reviewed-by: Kevin Geiszler <kevin.j.geiszler@gmail.com>
(cherry picked from commit b5913a7)
PDavid added a commit that referenced this pull request Nov 25, 2026
Signed-off-by: Tak Lon (Stephen) Wu <taklwu@apache.org>
Reviewed-by: Kevin Geiszler <kevin.j.geiszler@gmail.com>
(cherry picked from commit b5913a7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants