[
https://issues.apache.org/jira/browse/HIVE-25495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17955931#comment-17955931
]
László Bodor edited comment on HIVE-25495 at 6/5/25 11:34 AM:
--------------------------------------------------------------
after opening the latest [PR|https://github.com/apache/hive/pull/5838] (and
removing an earlier jline2
[workaround|https://github.com/apache/hive/blob/ba1b83db1d8c90187d68661b819a1420dca778f5/beeline/src/java/org/apache/hive/beeline/BeeLine.java#L1415-L1425]),
I just tried to use beeline locally, but unfortunately it seems like this
needs so much work, as it's broken in so many ways, just a few examples (will
update here once I made it work)
1. prompt is not visible (no matter where I tried to change the prompt for
testing purposes, I didn't see it was effective, basically, it's the
readLines(prompt, ...) calls
{code}
>....
{code}
instead of:
{code}
0: jdbc:hive2://localhost:10000/default>
{code}
UPDATE: this is broken since jline 3.25.1, as in 3.25.0, it works properly
(manually tried)
TODO: report this to jline, as even the latest 3.30.4 seems to be broken
2. -f parameter doesn't work: instead of running the file given by the
parameter, it remains in beeline shell in a totally broken way
UPDATE: works, I just broke an earlier logic when I removed the abovementioned
fix
3. arrow navigation is broken, printing stuff like:
{code}
0: jdbc:hive2://localhost:10000/default> ^[OA^[OB^[OC^[OD
{code}
UPDATE: need to use system terminal to overcome this
4. simple init script runs but then prints an exception:
{code}
beeline -u "jdbc:hive2://localhost:10000/default;retries=30;" -i ~/init.sql
...
Driver: Hive JDBC (version 4.0.1)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Running init script /Users/laszlobodor/init.sql
25/06/05 13:30:40 [main]: WARN util.NativeCodeLoader: Unable to load
native-hadoop library for your platform... using builtin-java classes where
applicable
set hive.query.results.cache.enabled=false;
0: jdbc:hive2://localhost:10000/default> set
hive.query.results.cache.enabled=false;
No rows affected (0.052 seconds)
0: jdbc:hive2://localhost:10000/default>
org.jline.reader.EndOfFileException
init script execution failed.
Closing: 0: jdbc:hive2://localhost:10000/default;retries=30;
{code}
where init.sql is like below:
{code}
set hive.query.results.cache.enabled=false;
{code}
was (Author: abstractdog):
after opening the latest [PR|https://github.com/apache/hive/pull/5838] (and
removing an earlier jline2
[workaround|https://github.com/apache/hive/blob/ba1b83db1d8c90187d68661b819a1420dca778f5/beeline/src/java/org/apache/hive/beeline/BeeLine.java#L1415-L1425]),
I just tried to use beeline locally, but unfortunately it seems like this
needs so much work, as it's broken in so many ways, just 2 examples:
1. prompt is not visible (no matter where I tried to change the prompt for
testing purposes, I didn't see it was effective, basically, it's the
readLines(prompt, ...) calls
{code}
>....
{code}
instead of:
{code}
0: jdbc:hive2://localhost:10000/default>
{code}
UPDATE: this is broken since jline 3.25.1, as in 3.25.0, it works properly
(manually tried)
TODO: report this to jline, as even the latest 3.30.4 seems to be broken
2. -f parameter doesn't work: instead of running the file given by the
parameter, it remains in beeline shell in a totally broken way
UPDATE: works, I just broke an earlier logic when I removed the abovementioned
fix
3. arrow navigation is broken, printing stuff like:
{code}
0: jdbc:hive2://localhost:10000/default> ^[OA^[OB^[OC^[OD
{code}
UPDATE: need to use system terminal to overcome this
4. simple init script runs but then prints an exception:
{code}
beeline -u "jdbc:hive2://localhost:10000/default;retries=30;" -i ~/init.sql
...
Driver: Hive JDBC (version 4.0.1)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Running init script /Users/laszlobodor/init.sql
25/06/05 13:30:40 [main]: WARN util.NativeCodeLoader: Unable to load
native-hadoop library for your platform... using builtin-java classes where
applicable
set hive.query.results.cache.enabled=false;
0: jdbc:hive2://localhost:10000/default> set
hive.query.results.cache.enabled=false;
No rows affected (0.052 seconds)
0: jdbc:hive2://localhost:10000/default>
org.jline.reader.EndOfFileException
init script execution failed.
Closing: 0: jdbc:hive2://localhost:10000/default;retries=30;
{code}
where init.sql is like below:
{code}
set hive.query.results.cache.enabled=false;
{code}
> Upgrade to JLine3
> -----------------
>
> Key: HIVE-25495
> URL: https://issues.apache.org/jira/browse/HIVE-25495
> Project: Hive
> Issue Type: Improvement
> Reporter: David Mollitor
> Assignee: László Bodor
> Priority: Major
> Labels: pull-request-available
> Time Spent: 4h
> Remaining Estimate: 0h
>
> Jline 2 has been discontinued a long while ago. Hadoop uses JLine3 so Hive
> should match.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)