Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-19927

SparkThriftServer2 can not get ''--hivevar" variables in spark 2.1

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 2.0.1, 2.1.0
    • None
    • SQL
    • None
    • CentOS 6.5,spark 2.1 build with mvn -Pyarn -Phadoop-2.6 -Dhadoop.version=2.6.0 -Phive -Phive-thriftserver -Dscala-2.11

    Description

      suppose the content of file test.sql:
      -------------------------------------------------
      !connect jdbc:hive2://localhost:10000 test test
      USE ${hivevar:db_name};
      -------------------------------------------------

      when execute beeline command: bin/beeline -f /tmp/test.sql --hivevar db_name=offline
      the output is:
      ------------------------------------------------------------------------------------
      Error: org.apache.spark.sql.catalyst.parser.ParseException:
      no viable alternative at input '<EOF>'(line 1, pos 4)

      == SQL ==
      use
      ----^^^ (state=,code=0)
      -------------------------------------------------------------------------------------

      so the parameter --hivevar can not be read from beeline CLI.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              xwc3504 bruce xu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: