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

Support executing script file from hdfs in beeline

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      It is supported for cli to execute hive script on hdfs, it should be straightforward to support it in beeline too.

      Beeline.java

        private int executeFile(String fileName) {
          FileInputStream initStream = null;
          try {
            initStream = new FileInputStream(fileName);
            return execute(getConsoleReader(initStream), true);
          } catch (Throwable t) {
            handleException(t);
            return ERRNO_OTHER;
          } finally {
            IOUtils.closeStream(initStream);
            consoleReader = null;
            output("");   // dummy new line
          }
        }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Ferd Ferdinand Xu
                Reporter:
                zjffdu Jeff Zhang
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: