[ 
https://issues.apache.org/jira/browse/HIVE-9310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14275282#comment-14275282
 ] 

Gopal V commented on HIVE-9310:
-------------------------------

Actually, I tried to flush in the signal handler + try/catch ignore and 
annoyingly it looks like it stills needs some thread synchronization.

The sighandler runs as a different thread and flushes the history from a 
different thread while interrupting the main thread. The threading looks rather 
odd, but I'm guessing the processLine() is called from Oozie directly as well 
(unlike the CLI loop).

I'm committing this as-is as I'm tired of losing all CLI history in my test 
runs - need at least parity to 0.14 levels before I introduce new bugs/features.

> CLI JLine does not flush history back to ~/.hivehistory
> -------------------------------------------------------
>
>                 Key: HIVE-9310
>                 URL: https://issues.apache.org/jira/browse/HIVE-9310
>             Project: Hive
>          Issue Type: Bug
>          Components: CLI
>    Affects Versions: 0.15.0
>            Reporter: Gopal V
>            Assignee: Gopal V
>            Priority: Minor
>         Attachments: HIVE-9310.1.patch
>
>
> Hive CLI does not seem to be saving history anymore.
> In JLine with the PersistentHistory class, to keep history across sessions, 
> you need to do {{reader.getHistory().flush()}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to