Hive
  1. Hive
  2. HIVE-6173

Beeline doesn't accept --hiveconf option as Hive CLI does

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.10.0, 0.11.0, 0.12.0
    • Fix Version/s: 0.13.0
    • Component/s: CLI
    • Labels:
      None
    • Release Note:
      This (--hiveconf option) needs documentation if not being documented yet.

      Description

      > beeline -u jdbc:hive2:// --hiveconf a=b
      Usage: java org.apache.hive.cli.beeline.BeeLine 
      

      Since Beeline is replacing Hive CLI, it should support this command line option as well.

      1. HIVE-6173.patch
        6 kB
        Xuefu Zhang
      2. HIVE-6173.2.patch
        8 kB
        Xuefu Zhang
      3. HIVE-6173.1.patch
        9 kB
        Xuefu Zhang

        Issue Links

          Activity

          Hide
          Lefty Leverenz added a comment -

          I documented Beeline's command line options in the HiveServer2 Clients doc:

          This needs careful review and revision! My sources were BeeLine.properties, BeeLineOpts.java, the SQLLine doc, some Hive JIRAS, a bit of Java documentation, and common sense.

          Questions:

          1. Does the query string for -e take single quotes or double quotes?
          2. Is the autoCommit default false as shown in BeeLineOpts.java or true as shown in the SQLLine doc?
          3. What are the possible values & default value for isolation?
          4. What is the default for numberFormat? BeeLineOpts.java says "default" but I don't know what that means.
          5. Is the description of the default for maxWidth okay? (Modified from SQLLine doc.)
          6. Does showNestedErrs have a JIRA ticket? (It isn't in the SQLLine doc.)
          7. Should any of these options be documented?

          • --incremental (in BeeLineOpts & SQLLine doc, but not in BeeLine.properties)
          • --showElapsedTime (in BeeLineOpts, not in BeeLine.properties nor SQLLine doc)
          • --maxHeight (ditto)
          • --timeout (ditto)
          • --trimScripts (ditto)
          • --allowMultiLineCommand (ditto)

          Please fix the doc or tell me what to fix.

          Show
          Lefty Leverenz added a comment - I documented Beeline's command line options in the HiveServer2 Clients doc: Beeline Command Options This needs careful review and revision! My sources were BeeLine.properties, BeeLineOpts.java, the SQLLine doc, some Hive JIRAS, a bit of Java documentation, and common sense. Questions: 1. Does the query string for -e take single quotes or double quotes? 2. Is the autoCommit default false as shown in BeeLineOpts.java or true as shown in the SQLLine doc? 3. What are the possible values & default value for isolation? 4. What is the default for numberFormat? BeeLineOpts.java says "default" but I don't know what that means. 5. Is the description of the default for maxWidth okay? (Modified from SQLLine doc.) 6. Does showNestedErrs have a JIRA ticket? (It isn't in the SQLLine doc.) 7. Should any of these options be documented? --incremental (in BeeLineOpts & SQLLine doc, but not in BeeLine.properties) --showElapsedTime (in BeeLineOpts, not in BeeLine.properties nor SQLLine doc) --maxHeight (ditto) --timeout (ditto) --trimScripts (ditto) --allowMultiLineCommand (ditto) Please fix the doc or tell me what to fix.
          Hide
          Xuefu Zhang added a comment -

          Patch committed to trunk. Thanks to Prasad for the review.

          Show
          Xuefu Zhang added a comment - Patch committed to trunk. Thanks to Prasad for the review.
          Hide
          Xuefu Zhang added a comment -

          I don't think the above failures has anything to do with this patch.

          Show
          Xuefu Zhang added a comment - I don't think the above failures has anything to do with this patch.
          Hide
          Hive QA added a comment -

          Overall: -1 at least one tests failed

          Here are the results of testing the latest attachment:
          https://issues.apache.org/jira/secure/attachment/12626201/HIVE-6173.2.patch

          ERROR: -1 due to 2 failed/errored test(s), 4981 tests executed
          Failed tests:

          org.apache.hadoop.hive.cli.TestMinimrCliDriver.testCliDriver_auto_sortmerge_join_16
          org.apache.hadoop.hive.cli.TestMinimrCliDriver.testCliDriver_parallel_orderby
          

          Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/1129/testReport
          Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/1129/console

          Messages:

          Executing org.apache.hive.ptest.execution.PrepPhase
          Executing org.apache.hive.ptest.execution.ExecutionPhase
          Executing org.apache.hive.ptest.execution.ReportingPhase
          Tests exited with: TestsFailedException: 2 tests failed
          

          This message is automatically generated.

          ATTACHMENT ID: 12626201

          Show
          Hive QA added a comment - Overall : -1 at least one tests failed Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12626201/HIVE-6173.2.patch ERROR: -1 due to 2 failed/errored test(s), 4981 tests executed Failed tests: org.apache.hadoop.hive.cli.TestMinimrCliDriver.testCliDriver_auto_sortmerge_join_16 org.apache.hadoop.hive.cli.TestMinimrCliDriver.testCliDriver_parallel_orderby Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/1129/testReport Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/1129/console Messages: Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 2 tests failed This message is automatically generated. ATTACHMENT ID: 12626201
          Hide
          Prasad Mujumdar added a comment -

          +1
          Looks fine to me. Let's wait for the pre-commit test run.

          Show
          Prasad Mujumdar added a comment - +1 Looks fine to me. Let's wait for the pre-commit test run.
          Hide
          Xuefu Zhang added a comment -

          Patch #2 updated with the changes in HIVE-6217 removed.

          Show
          Xuefu Zhang added a comment - Patch #2 updated with the changes in HIVE-6217 removed.
          Hide
          Hive QA added a comment -

          Overall: +1 all checks pass

          Here are the results of testing the latest attachment:
          https://issues.apache.org/jira/secure/attachment/12625655/HIVE-6173.1.patch

          SUCCESS: +1 4973 tests passed

          Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/1108/testReport
          Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/1108/console

          Messages:

          Executing org.apache.hive.ptest.execution.PrepPhase
          Executing org.apache.hive.ptest.execution.ExecutionPhase
          Executing org.apache.hive.ptest.execution.ReportingPhase
          

          This message is automatically generated.

          ATTACHMENT ID: 12625655

          Show
          Hive QA added a comment - Overall : +1 all checks pass Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12625655/HIVE-6173.1.patch SUCCESS: +1 4973 tests passed Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/1108/testReport Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/1108/console Messages: Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase This message is automatically generated. ATTACHMENT ID: 12625655
          Hide
          Xuefu Zhang added a comment -

          Patch #1 includes patch for HIVE-6217.

          Show
          Xuefu Zhang added a comment - Patch #1 includes patch for HIVE-6217 .
          Hide
          Prasad Mujumdar added a comment -

          Hive supports a config parameter hive.conf.restricted.list for that purpose. It's a comma separated list of configs that can't be changed by users. Currently its empty by default, just restrict.list itself is implicitly added to it.

          Show
          Prasad Mujumdar added a comment - Hive supports a config parameter hive.conf.restricted.list for that purpose. It's a comma separated list of configs that can't be changed by users. Currently its empty by default, just restrict.list itself is implicitly added to it.
          Hide
          Navis added a comment -

          HiveServer can set hive.conf.restricted.list to prohibit overriding critical configurations. Currently empty for default but it should include some security/metastore related configs, imho.

          Show
          Navis added a comment - HiveServer can set hive.conf.restricted.list to prohibit overriding critical configurations. Currently empty for default but it should include some security/metastore related configs, imho.
          Hide
          Alan Gates added a comment -

          One question here is what options users should be able to set. Certain options set in the server shouldn't be changeable by users, such as the authorization provider. Is any work being done here to consider which values the user should and shouldn't be able to set?

          Show
          Alan Gates added a comment - One question here is what options users should be able to set. Certain options set in the server shouldn't be changeable by users, such as the authorization provider. Is any work being done here to consider which values the user should and shouldn't be able to set?
          Hide
          Prasad Mujumdar added a comment -

          Xuefu Zhang Thanks for the putting the patch out. I left some comments on the RB.

          Show
          Prasad Mujumdar added a comment - Xuefu Zhang Thanks for the putting the patch out. I left some comments on the RB.
          Hide
          Xuefu Zhang added a comment -
          Show
          Xuefu Zhang added a comment - RB: https://reviews.apache.org/r/16910/
          Hide
          Hive QA added a comment -

          Overall: +1 all checks pass

          Here are the results of testing the latest attachment:
          https://issues.apache.org/jira/secure/attachment/12622731/HIVE-6173.patch

          SUCCESS: +1 4925 tests passed

          Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/896/testReport
          Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/896/console

          Messages:

          Executing org.apache.hive.ptest.execution.PrepPhase
          Executing org.apache.hive.ptest.execution.ExecutionPhase
          Executing org.apache.hive.ptest.execution.ReportingPhase
          

          This message is automatically generated.

          ATTACHMENT ID: 12622731

          Show
          Hive QA added a comment - Overall : +1 all checks pass Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12622731/HIVE-6173.patch SUCCESS: +1 4925 tests passed Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/896/testReport Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/896/console Messages: Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase This message is automatically generated. ATTACHMENT ID: 12622731
          Hide
          Xuefu Zhang added a comment -

          Vaibhav Gumashta Thanks for clarification. I guess the root cause of these issues are due to what's stated here. However, HIVE-5677 seems not realizing that, and the patch doesn't seem addressing the issue.

          Let me know if you'd like to work on this issue either via this JIRA or others.

          Show
          Xuefu Zhang added a comment - Vaibhav Gumashta Thanks for clarification. I guess the root cause of these issues are due to what's stated here. However, HIVE-5677 seems not realizing that, and the patch doesn't seem addressing the issue. Let me know if you'd like to work on this issue either via this JIRA or others.
          Hide
          Vaibhav Gumashta added a comment -

          Xuefu Zhang Actually I had created HIVE-6142 to look into the hiveconf issue itself. But since that was marked duplicate of HIVE-5677, I closed it (I notice HIVE-5677 is a little different).

          Show
          Vaibhav Gumashta added a comment - Xuefu Zhang Actually I had created HIVE-6142 to look into the hiveconf issue itself. But since that was marked duplicate of HIVE-5677 , I closed it (I notice HIVE-5677 is a little different).
          Hide
          Xuefu Zhang added a comment -

          Vaibhav Gumashta I assume that your duplication remark doesn't apply here.

          Show
          Xuefu Zhang added a comment - Vaibhav Gumashta I assume that your duplication remark doesn't apply here.
          Hide
          Vaibhav Gumashta added a comment -

          Infact HIVE-6142 is duplicate of: HIVE-5677, closed that.

          Show
          Vaibhav Gumashta added a comment - Infact HIVE-6142 is duplicate of: HIVE-5677 , closed that.
          Hide
          Vaibhav Gumashta added a comment -

          Duplicate of HIVE-6142

          Show
          Vaibhav Gumashta added a comment - Duplicate of HIVE-6142

            People

            • Assignee:
              Xuefu Zhang
              Reporter:
              Xuefu Zhang
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development