[
https://issues.apache.org/jira/browse/HIVE-12789?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shinichi Yamashita updated HIVE-12789:
--------------------------------------
Attachment: HIVE-12789.2.patch
Jline 2.12 is processing load method in new FileHistory(File).
I confirmed that it is in the following code at BeeLine#getConsoleReader.
{code}
try {
// now set the output for the history
consoleReader.setHistory(new FileHistory(new File(...)));
} catch (Exception e) {
{code}
And load method is disposed of again in BeeLine#getConsoleReader.
{code}
if (hist != null) {
History h = consoleReader.getHistory();
if (h instanceof FileHistory) {
((FileHistory) consoleReader.getHistory()).load(...));
} else {
(snip)
{code}
I think this problem occurs by these. And I revise it not to call load in the
latter half.
> Fix output twice in the history command of Beeline
> --------------------------------------------------
>
> Key: HIVE-12789
> URL: https://issues.apache.org/jira/browse/HIVE-12789
> Project: Hive
> Issue Type: Bug
> Components: Beeline
> Reporter: Shinichi Yamashita
> Assignee: Shinichi Yamashita
> Attachments: HIVE-12789.1.patch, HIVE-12789.2.patch
>
>
> When I revised HIVE-12780, I confirmed that a result of history output it
> twice.
> {quote}
> [root@hadoop ~]# cat ~/.beeline/history
> select 1;
> select 2;
> select 3;
> [root@hadoop ~]# beeline
> which: no hbase in
> (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/hadoop/bin:/usr/local/hive/bin:/usr/pgsql-9.4/bin:/root/bin)
> Beeline version 2.1.0-SNAPSHOT by Apache Hive
> beeline> !history
> 1. 0: select 1;
> 1. 1: select 2;
> 1. 2: select 3;
> 1. 3: select 1;
> 1. 4: select 2;
> 1. 5: select 3;
> {quote}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)