hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aihua Xu (JIRA)" <>
Subject [jira] [Commented] (HIVE-15166) Provide beeline option to set the jline history max size
Date Thu, 12 Jan 2017 14:52:52 GMT


Aihua Xu commented on HIVE-15166:

[~ericlin] Thanks for working on it. I was working on a FileHistory with limited file size,
but I feel your simple approach would work nicely.

A couple of comments:
* Is the change in .gitignore what you intend to make? If not, can you remove that change?
* Seems you are not using the latest code? Can you sync to the latest and apply the change?
* Seems it makes sense to call ((FileHistory) h).setMaxSize(getOpts().getMaxHistoryRows());
when you create the FileHistory so we won't cache too many history in the memory as well.

private void setupHistory() throws IOException {
    if (this.history != null) {

    this.history = new FileHistory(new File(getOpts().getHistoryFile()));
    *** Set the maxSize here ***
    // add shutdown hook to flush the history to history file
    ShutdownHookManager.addShutdownHook(new Runnable() {
      public void run() {
        try {
        } catch (IOException e) {

> Provide beeline option to set the jline history max size
> --------------------------------------------------------
>                 Key: HIVE-15166
>                 URL:
>             Project: Hive
>          Issue Type: Improvement
>          Components: Beeline
>    Affects Versions: 2.1.0
>            Reporter: Eric Lin
>            Assignee: Eric Lin
>            Priority: Minor
>         Attachments: HIVE-15166.patch
> Currently Beeline does not provide an option to limit the max size for beeline history
file, in the case that each query is very big, it will flood the history file and slow down
beeline on start up and shutdown.

This message was sent by Atlassian JIRA

View raw message