Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-10836

Beeline OutOfMemoryError due to large history

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • None
    • None
    • Hive 1.1.0 on RHEL with Cloudera (cdh5.4.0)

    Description

      Attempting to run beeline via commandline fails with the error below due to large commands in the ~/.beeline/history file. Not sure if the problem also exists with many lines in the history or just big lines.

      I had a few lines in my history file with over 1 million characters each. Deleting said lines from the history file resolved the issue.

      Beeline version 1.1.0-cdh5.4.0 by Apache Hive
      Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
      at java.util.Arrays.copyOf(Arrays.java:2367)
      at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130)
      at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114)
      at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:535)
      at java.lang.StringBuffer.append(StringBuffer.java:322)
      at java.io.BufferedReader.readLine(BufferedReader.java:363)
      at java.io.BufferedReader.readLine(BufferedReader.java:382)
      at jline.console.history.FileHistory.load(FileHistory.java:69)
      at jline.console.history.FileHistory.load(FileHistory.java:61)
      at org.apache.hive.beeline.BeeLine.getConsoleReader(BeeLine.java:869)
      at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:766)
      at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:480)
      at org.apache.hive.beeline.BeeLine.main(BeeLine.java:463)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
      at org.apache.hadoop.util.RunJar.main(RunJar.java:136)

      Attachments

        1. HIVE-10836.1.patch
          5 kB
          Aihua Xu

        Issue Links

          Activity

            People

              aihuaxu Aihua Xu
              pmcanneny Patrick McAnneny
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: