Hive
  1. Hive
  2. HIVE-6122

Implement show grant on <resource>

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.13.0
    • Component/s: Authorization
    • Labels:
      None

      Description

      Currently, hive shows privileges owned by a principal. Reverse API is also needed, which shows all principals for a resource.

      show grant user hive_test_user on database default;
      show grant user hive_test_user on table dummy;
      show grant user hive_test_user on all;
      
      1. HIVE-6122.6.patch
        79 kB
        Ashutosh Chauhan
      2. HIVE-6122.5.patch
        79 kB
        Ashutosh Chauhan
      3. HIVE-6122.4.patch
        77 kB
        Ashutosh Chauhan
      4. HIVE-6122.4.patch
        77 kB
        Ashutosh Chauhan
      5. HIVE-6122.3.patch.txt
        80 kB
        Navis
      6. HIVE-6122.2.patch.txt
        67 kB
        Navis
      7. HIVE-6122.1.patch.txt
        66 kB
        Navis

        Issue Links

          Activity

          Hide
          Ashutosh Chauhan added a comment -

          Certainly resolving conflicts was easier than writing patch in first place : ) Thanks for all your work!

          Show
          Ashutosh Chauhan added a comment - Certainly resolving conflicts was easier than writing patch in first place : ) Thanks for all your work!
          Hide
          Navis added a comment -

          Ashutosh Chauhan It might not be easy to resolve conflicts with other patches. Thanks for your works.

          Show
          Navis added a comment - Ashutosh Chauhan It might not be easy to resolve conflicts with other patches. Thanks for your works.
          Hide
          Ashutosh Chauhan added a comment -

          Committed to trunk. Thanks, Navis!

          Show
          Ashutosh Chauhan added a comment - Committed to trunk. Thanks, Navis!
          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/12626053/HIVE-6122.6.patch

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

          org.apache.hadoop.hive.cli.TestMinimrCliDriver.testCliDriver_infer_bucket_sort_dyn_part
          

          Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/1117/testReport
          Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/1117/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: 1 tests failed
          

          This message is automatically generated.

          ATTACHMENT ID: 12626053

          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/12626053/HIVE-6122.6.patch ERROR: -1 due to 1 failed/errored test(s), 4973 tests executed Failed tests: org.apache.hadoop.hive.cli.TestMinimrCliDriver.testCliDriver_infer_bucket_sort_dyn_part Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/1117/testReport Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/1117/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: 1 tests failed This message is automatically generated. ATTACHMENT ID: 12626053
          Hide
          Ashutosh Chauhan added a comment -

          Another rebase on trunk.

          Show
          Ashutosh Chauhan added a comment - Another rebase on trunk.
          Hide
          Hive QA added a comment -

          Overall: -1 no tests executed

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

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

          Messages:

          Executing org.apache.hive.ptest.execution.PrepPhase
          Tests exited with: NonZeroExitCodeException
          Command 'bash /data/hive-ptest/working/scratch/source-prep.sh' failed with exit status 1 and output '+ [[ -n '' ]]
          + export 'ANT_OPTS=-Xmx1g -XX:MaxPermSize=256m '
          + ANT_OPTS='-Xmx1g -XX:MaxPermSize=256m '
          + export 'M2_OPTS=-Xmx1g -XX:MaxPermSize=256m -Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128'
          + M2_OPTS='-Xmx1g -XX:MaxPermSize=256m -Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128'
          + cd /data/hive-ptest/working/
          + tee /data/hive-ptest/logs/PreCommit-HIVE-Build-1106/source-prep.txt
          + [[ false == \t\r\u\e ]]
          + mkdir -p maven ivy
          + [[ svn = \s\v\n ]]
          + [[ -n '' ]]
          + [[ -d apache-svn-trunk-source ]]
          + [[ ! -d apache-svn-trunk-source/.svn ]]
          + [[ ! -d apache-svn-trunk-source ]]
          + cd apache-svn-trunk-source
          + svn revert -R .
          ++ egrep -v '^X|^Performing status on external'
          ++ awk '{print $2}'
          ++ svn status --no-ignore
          + rm -rf
          + svn update
          
          Fetching external item into 'hcatalog/src/test/e2e/harness'
          External at revision 1562672.
          
          At revision 1562672.
          + patchCommandPath=/data/hive-ptest/working/scratch/smart-apply-patch.sh
          + patchFilePath=/data/hive-ptest/working/scratch/build.patch
          + [[ -f /data/hive-ptest/working/scratch/build.patch ]]
          + chmod +x /data/hive-ptest/working/scratch/smart-apply-patch.sh
          + /data/hive-ptest/working/scratch/smart-apply-patch.sh /data/hive-ptest/working/scratch/build.patch
          The patch does not appear to apply with p0, p1, or p2
          + exit 1
          '
          

          This message is automatically generated.

          ATTACHMENT ID: 12625910

          Show
          Hive QA added a comment - Overall : -1 no tests executed Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12625910/HIVE-6122.5.patch Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/1106/testReport Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/1106/console Messages: Executing org.apache.hive.ptest.execution.PrepPhase Tests exited with: NonZeroExitCodeException Command 'bash /data/hive-ptest/working/scratch/source-prep.sh' failed with exit status 1 and output '+ [[ -n '' ]] + export 'ANT_OPTS=-Xmx1g -XX:MaxPermSize=256m ' + ANT_OPTS='-Xmx1g -XX:MaxPermSize=256m ' + export 'M2_OPTS=-Xmx1g -XX:MaxPermSize=256m -Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128' + M2_OPTS='-Xmx1g -XX:MaxPermSize=256m -Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128' + cd /data/hive-ptest/working/ + tee /data/hive-ptest/logs/PreCommit-HIVE-Build-1106/source-prep.txt + [[ false == \t\r\u\e ]] + mkdir -p maven ivy + [[ svn = \s\v\n ]] + [[ -n '' ]] + [[ -d apache-svn-trunk-source ]] + [[ ! -d apache-svn-trunk-source/.svn ]] + [[ ! -d apache-svn-trunk-source ]] + cd apache-svn-trunk-source + svn revert -R . ++ egrep -v '^X|^Performing status on external' ++ awk '{print $2}' ++ svn status --no-ignore + rm -rf + svn update Fetching external item into 'hcatalog/src/test/e2e/harness' External at revision 1562672. At revision 1562672. + patchCommandPath=/data/hive-ptest/working/scratch/smart-apply-patch.sh + patchFilePath=/data/hive-ptest/working/scratch/build.patch + [[ -f /data/hive-ptest/working/scratch/build.patch ]] + chmod +x /data/hive-ptest/working/scratch/smart-apply-patch.sh + /data/hive-ptest/working/scratch/smart-apply-patch.sh /data/hive-ptest/working/scratch/build.patch The patch does not appear to apply with p0, p1, or p2 + exit 1 ' This message is automatically generated. ATTACHMENT ID: 12625910
          Hide
          Ashutosh Chauhan added a comment -

          Resolved conflicts because of HIVE-5929.

          Show
          Ashutosh Chauhan added a comment - Resolved conflicts because of HIVE-5929 .
          Hide
          Hive QA added a comment -

          Overall: -1 no tests executed

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

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

          Messages:

          Executing org.apache.hive.ptest.execution.PrepPhase
          Tests exited with: NonZeroExitCodeException
          Command 'bash /data/hive-ptest/working/scratch/source-prep.sh' failed with exit status 1 and output '+ [[ -n '' ]]
          + export 'ANT_OPTS=-Xmx1g -XX:MaxPermSize=256m '
          + ANT_OPTS='-Xmx1g -XX:MaxPermSize=256m '
          + export 'M2_OPTS=-Xmx1g -XX:MaxPermSize=256m -Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128'
          + M2_OPTS='-Xmx1g -XX:MaxPermSize=256m -Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128'
          + cd /data/hive-ptest/working/
          + tee /data/hive-ptest/logs/PreCommit-HIVE-Build-1091/source-prep.txt
          + [[ false == \t\r\u\e ]]
          + mkdir -p maven ivy
          + [[ svn = \s\v\n ]]
          + [[ -n '' ]]
          + [[ -d apache-svn-trunk-source ]]
          + [[ ! -d apache-svn-trunk-source/.svn ]]
          + [[ ! -d apache-svn-trunk-source ]]
          + cd apache-svn-trunk-source
          + svn revert -R .
          Reverted 'bin/hive'
          ++ egrep -v '^X|^Performing status on external'
          ++ awk '{print $2}'
          ++ svn status --no-ignore
          + rm -rf target datanucleus.log ant/target shims/target shims/0.20/target shims/0.20S/target shims/0.23/target shims/aggregator/target shims/common/target shims/common-secure/target packaging/target hbase-handler/target testutils/target jdbc/target metastore/target itests/target itests/hcatalog-unit/target itests/test-serde/target itests/qtest/target itests/hive-unit/target itests/custom-serde/target itests/util/target hcatalog/target hcatalog/storage-handlers/hbase/target hcatalog/server-extensions/target hcatalog/core/target hcatalog/webhcat/svr/target hcatalog/webhcat/java-client/target hcatalog/hcatalog-pig-adapter/target hwi/target common/target common/src/gen contrib/target service/target serde/target beeline/target odbc/target cli/target ql/dependency-reduced-pom.xml ql/target
          + svn update
          U    ql/src/test/results/compiler/plan/input9.q.xml
          U    ql/src/test/results/compiler/plan/udf1.q.xml
          U    ql/src/test/results/compiler/plan/input20.q.xml
          U    ql/src/test/results/compiler/plan/sample1.q.xml
          U    ql/src/test/results/compiler/plan/udf4.q.xml
          U    ql/src/test/results/compiler/plan/sample2.q.xml
          U    ql/src/test/results/compiler/plan/sample3.q.xml
          U    ql/src/test/results/compiler/plan/udf6.q.xml
          U    ql/src/test/results/compiler/plan/sample4.q.xml
          U    ql/src/test/results/compiler/plan/sample5.q.xml
          U    ql/src/test/results/compiler/plan/sample6.q.xml
          U    ql/src/test/results/compiler/plan/sample7.q.xml
          U    ql/src/test/results/compiler/plan/groupby1.q.xml
          U    ql/src/test/results/compiler/plan/groupby2.q.xml
          U    ql/src/test/results/compiler/plan/udf_case.q.xml
          U    ql/src/test/results/compiler/plan/groupby3.q.xml
          U    ql/src/test/results/compiler/plan/subq.q.xml
          U    ql/src/test/results/compiler/plan/cast1.q.xml
          U    ql/src/test/results/compiler/plan/groupby4.q.xml
          U    ql/src/test/results/compiler/plan/groupby5.q.xml
          U    ql/src/test/results/compiler/plan/groupby6.q.xml
          U    ql/src/test/results/compiler/plan/join1.q.xml
          U    ql/src/test/results/compiler/plan/join2.q.xml
          U    ql/src/test/results/compiler/plan/join3.q.xml
          U    ql/src/test/results/compiler/plan/join4.q.xml
          U    ql/src/test/results/compiler/plan/join5.q.xml
          U    ql/src/test/results/compiler/plan/case_sensitivity.q.xml
          U    ql/src/test/results/compiler/plan/join6.q.xml
          U    ql/src/test/results/compiler/plan/join7.q.xml
          U    ql/src/test/results/compiler/plan/join8.q.xml
          U    ql/src/test/results/compiler/plan/union.q.xml
          U    ql/src/test/results/compiler/plan/udf_when.q.xml
          U    ql/src/test/results/compiler/plan/input_testxpath.q.xml
          U    ql/src/test/results/compiler/plan/input_part1.q.xml
          U    ql/src/test/results/compiler/plan/input1.q.xml
          U    ql/src/test/results/compiler/plan/input2.q.xml
          U    ql/src/test/results/compiler/plan/input3.q.xml
          U    ql/src/test/results/compiler/plan/input4.q.xml
          U    ql/src/test/results/compiler/plan/input5.q.xml
          U    ql/src/test/results/compiler/plan/input_testxpath2.q.xml
          U    ql/src/test/results/compiler/plan/input6.q.xml
          U    ql/src/test/results/compiler/plan/input7.q.xml
          U    ql/src/test/results/compiler/plan/input_testsequencefile.q.xml
          U    ql/src/test/results/compiler/plan/input8.q.xml
          U    ql/src/java/org/apache/hadoop/hive/ql/plan/PartitionDesc.java
          
          Fetching external item into 'hcatalog/src/test/e2e/harness'
          Updated external to revision 1562376.
          
          Updated to revision 1562376.
          + patchCommandPath=/data/hive-ptest/working/scratch/smart-apply-patch.sh
          + patchFilePath=/data/hive-ptest/working/scratch/build.patch
          + [[ -f /data/hive-ptest/working/scratch/build.patch ]]
          + chmod +x /data/hive-ptest/working/scratch/smart-apply-patch.sh
          + /data/hive-ptest/working/scratch/smart-apply-patch.sh /data/hive-ptest/working/scratch/build.patch
          The patch does not appear to apply with p0, p1, or p2
          + exit 1
          '
          

          This message is automatically generated.

          ATTACHMENT ID: 12625777

          Show
          Hive QA added a comment - Overall : -1 no tests executed Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12625777/HIVE-6122.4.patch Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/1091/testReport Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/1091/console Messages: Executing org.apache.hive.ptest.execution.PrepPhase Tests exited with: NonZeroExitCodeException Command 'bash /data/hive-ptest/working/scratch/source-prep.sh' failed with exit status 1 and output '+ [[ -n '' ]] + export 'ANT_OPTS=-Xmx1g -XX:MaxPermSize=256m ' + ANT_OPTS='-Xmx1g -XX:MaxPermSize=256m ' + export 'M2_OPTS=-Xmx1g -XX:MaxPermSize=256m -Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128' + M2_OPTS='-Xmx1g -XX:MaxPermSize=256m -Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128' + cd /data/hive-ptest/working/ + tee /data/hive-ptest/logs/PreCommit-HIVE-Build-1091/source-prep.txt + [[ false == \t\r\u\e ]] + mkdir -p maven ivy + [[ svn = \s\v\n ]] + [[ -n '' ]] + [[ -d apache-svn-trunk-source ]] + [[ ! -d apache-svn-trunk-source/.svn ]] + [[ ! -d apache-svn-trunk-source ]] + cd apache-svn-trunk-source + svn revert -R . Reverted 'bin/hive' ++ egrep -v '^X|^Performing status on external' ++ awk '{print $2}' ++ svn status --no-ignore + rm -rf target datanucleus.log ant/target shims/target shims/0.20/target shims/0.20S/target shims/0.23/target shims/aggregator/target shims/common/target shims/common-secure/target packaging/target hbase-handler/target testutils/target jdbc/target metastore/target itests/target itests/hcatalog-unit/target itests/test-serde/target itests/qtest/target itests/hive-unit/target itests/custom-serde/target itests/util/target hcatalog/target hcatalog/storage-handlers/hbase/target hcatalog/server-extensions/target hcatalog/core/target hcatalog/webhcat/svr/target hcatalog/webhcat/java-client/target hcatalog/hcatalog-pig-adapter/target hwi/target common/target common/src/gen contrib/target service/target serde/target beeline/target odbc/target cli/target ql/dependency-reduced-pom.xml ql/target + svn update U ql/src/test/results/compiler/plan/input9.q.xml U ql/src/test/results/compiler/plan/udf1.q.xml U ql/src/test/results/compiler/plan/input20.q.xml U ql/src/test/results/compiler/plan/sample1.q.xml U ql/src/test/results/compiler/plan/udf4.q.xml U ql/src/test/results/compiler/plan/sample2.q.xml U ql/src/test/results/compiler/plan/sample3.q.xml U ql/src/test/results/compiler/plan/udf6.q.xml U ql/src/test/results/compiler/plan/sample4.q.xml U ql/src/test/results/compiler/plan/sample5.q.xml U ql/src/test/results/compiler/plan/sample6.q.xml U ql/src/test/results/compiler/plan/sample7.q.xml U ql/src/test/results/compiler/plan/groupby1.q.xml U ql/src/test/results/compiler/plan/groupby2.q.xml U ql/src/test/results/compiler/plan/udf_case.q.xml U ql/src/test/results/compiler/plan/groupby3.q.xml U ql/src/test/results/compiler/plan/subq.q.xml U ql/src/test/results/compiler/plan/cast1.q.xml U ql/src/test/results/compiler/plan/groupby4.q.xml U ql/src/test/results/compiler/plan/groupby5.q.xml U ql/src/test/results/compiler/plan/groupby6.q.xml U ql/src/test/results/compiler/plan/join1.q.xml U ql/src/test/results/compiler/plan/join2.q.xml U ql/src/test/results/compiler/plan/join3.q.xml U ql/src/test/results/compiler/plan/join4.q.xml U ql/src/test/results/compiler/plan/join5.q.xml U ql/src/test/results/compiler/plan/case_sensitivity.q.xml U ql/src/test/results/compiler/plan/join6.q.xml U ql/src/test/results/compiler/plan/join7.q.xml U ql/src/test/results/compiler/plan/join8.q.xml U ql/src/test/results/compiler/plan/union.q.xml U ql/src/test/results/compiler/plan/udf_when.q.xml U ql/src/test/results/compiler/plan/input_testxpath.q.xml U ql/src/test/results/compiler/plan/input_part1.q.xml U ql/src/test/results/compiler/plan/input1.q.xml U ql/src/test/results/compiler/plan/input2.q.xml U ql/src/test/results/compiler/plan/input3.q.xml U ql/src/test/results/compiler/plan/input4.q.xml U ql/src/test/results/compiler/plan/input5.q.xml U ql/src/test/results/compiler/plan/input_testxpath2.q.xml U ql/src/test/results/compiler/plan/input6.q.xml U ql/src/test/results/compiler/plan/input7.q.xml U ql/src/test/results/compiler/plan/input_testsequencefile.q.xml U ql/src/test/results/compiler/plan/input8.q.xml U ql/src/java/org/apache/hadoop/hive/ql/plan/PartitionDesc.java Fetching external item into 'hcatalog/src/test/e2e/harness' Updated external to revision 1562376. Updated to revision 1562376. + patchCommandPath=/data/hive-ptest/working/scratch/smart-apply-patch.sh + patchFilePath=/data/hive-ptest/working/scratch/build.patch + [[ -f /data/hive-ptest/working/scratch/build.patch ]] + chmod +x /data/hive-ptest/working/scratch/smart-apply-patch.sh + /data/hive-ptest/working/scratch/smart-apply-patch.sh /data/hive-ptest/working/scratch/build.patch The patch does not appear to apply with p0, p1, or p2 + exit 1 ' This message is automatically generated. ATTACHMENT ID: 12625777
          Hide
          Ashutosh Chauhan added a comment -

          .3 Patch rebased on latest trunk.

          Show
          Ashutosh Chauhan added a comment - .3 Patch rebased on latest trunk.
          Hide
          Ashutosh Chauhan added a comment -

          Unfortunately, patch has gone stale. Navis, can you rebase it, lets get this in.

          Show
          Ashutosh Chauhan added a comment - Unfortunately, patch has gone stale. Navis, can you rebase it, lets get this in.
          Hide
          Ashutosh Chauhan added a comment -

          Thinking more on this, I think its fine to have this syntax, since this part of syntax is not part of standard anyways. Also, I mistakenly thought patch is introducing new keyword 'ALL' but 'ALL' is already a keyword both in Hive and in standard, so we should be good there.
          +1

          Show
          Ashutosh Chauhan added a comment - Thinking more on this, I think its fine to have this syntax, since this part of syntax is not part of standard anyways. Also, I mistakenly thought patch is introducing new keyword 'ALL' but 'ALL' is already a keyword both in Hive and in standard, so we should be good there. +1
          Hide
          Ashutosh Chauhan added a comment -

          Are you concerned about backward-compat? That we show all privileges for user with {{ show grant user hive_test_user }} as oppose to only user-level earlier. Than in HIVE-5928 a new plugin api is implemented, so we can make backward incompatible change on new api, instead of modifying behavior for existing syntax of old api. Also, HIVE-5929 has impl of that api.
          In other words, only with {{ set hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory }} {{ show grant user hive_test_user }} will show all privileges for user, otherwise old behavior.

          Show
          Ashutosh Chauhan added a comment - Are you concerned about backward-compat? That we show all privileges for user with {{ show grant user hive_test_user }} as oppose to only user-level earlier. Than in HIVE-5928 a new plugin api is implemented, so we can make backward incompatible change on new api, instead of modifying behavior for existing syntax of old api. Also, HIVE-5929 has impl of that api. In other words, only with {{ set hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory }} {{ show grant user hive_test_user }} will show all privileges for user, otherwise old behavior.
          Hide
          Navis added a comment -

          In HiveObjectType class, there are GLOBAL(1), DATABASE(2), TABLE(3), PARTITION(4), COLUMN(5)

          User level corresponds to "GLOBAL" which is checked when creating databases, etc.

          Show
          Navis added a comment - In HiveObjectType class, there are GLOBAL(1), DATABASE(2), TABLE(3), PARTITION(4), COLUMN(5) User level corresponds to "GLOBAL" which is checked when creating databases, etc.
          Hide
          Ashutosh Chauhan added a comment -

          Sorry, didn't get user-level privilege ? When I ran this statement, it ran and returned correctly, but returned empty result set. So, you are right it is reserved, but didn't get for what?

          For second part of your answer, I assume you meant show grant role hive_test_role Its fine if it is not implemented in current patch, we can do that in follow-up.

          Show
          Ashutosh Chauhan added a comment - Sorry, didn't get user-level privilege ? When I ran this statement, it ran and returned correctly, but returned empty result set. So, you are right it is reserved, but didn't get for what? For second part of your answer, I assume you meant show grant role hive_test_role Its fine if it is not implemented in current patch, we can do that in follow-up.
          Hide
          Navis added a comment -

          > show grant user hive_test_user on all;

          I really don't want add more keywords but "show grant user hive_test_user" is reserved for showing user-level privilege.

          > show grant user hive_test_user;

          Looks good idea.

          Show
          Navis added a comment - > show grant user hive_test_user on all; I really don't want add more keywords but "show grant user hive_test_user" is reserved for showing user-level privilege. > show grant user hive_test_user; Looks good idea.
          Hide
          Ashutosh Chauhan added a comment -

          Few questions:
          1. Instead of
          > show grant user hive_test_user on all;
          another alternative is not to introduce new keyword/token and instead if user doesn't specify resource, show grants for all resources, ie
          > show grant user hive_test_user;
          We can further cut down this to:
          > show grant;
          Above will show all grants for current user.

          2. Also does this patch work for roles as well, ie
          > show grant role hive_test_role;

          Show
          Ashutosh Chauhan added a comment - Few questions: 1. Instead of > show grant user hive_test_user on all; another alternative is not to introduce new keyword/token and instead if user doesn't specify resource, show grants for all resources, ie > show grant user hive_test_user; We can further cut down this to: > show grant; Above will show all grants for current user. 2. Also does this patch work for roles as well, ie > show grant role hive_test_role;
          Hide
          Thejas M Nair added a comment -

          Navis, can you please create a reviewboard link ?

          Show
          Thejas M Nair added a comment - Navis, can you please create a reviewboard link ?
          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/12623289/HIVE-6122.3.patch.txt

          SUCCESS: +1 4928 tests passed

          Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/931/testReport
          Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/931/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: 12623289

          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/12623289/HIVE-6122.3.patch.txt SUCCESS: +1 4928 tests passed Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/931/testReport Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/931/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: 12623289
          Hide
          Navis added a comment -

          Fixed test fails (cannot reproduce TestMinimrCliDriver.testCliDriver_schemeAuthority)

          Show
          Navis added a comment - Fixed test fails (cannot reproduce TestMinimrCliDriver.testCliDriver_schemeAuthority)
          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/12623061/HIVE-6122.2.patch.txt

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

          org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_alter_rename_partition_authorization
          org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_authorization_2
          org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_authorization_6
          org.apache.hadoop.hive.cli.TestMinimrCliDriver.testCliDriver_schemeAuthority
          org.apache.hadoop.hive.cli.TestNegativeCliDriver.testNegativeCliDriver_authorization_fail_4
          org.apache.hadoop.hive.cli.TestNegativeCliDriver.testNegativeCliDriver_authorization_fail_5
          org.apache.hadoop.hive.cli.TestNegativeCliDriver.testNegativeCliDriver_authorization_part
          

          Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/920/testReport
          Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/920/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: 7 tests failed
          

          This message is automatically generated.

          ATTACHMENT ID: 12623061

          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/12623061/HIVE-6122.2.patch.txt ERROR: -1 due to 7 failed/errored test(s), 4926 tests executed Failed tests: org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_alter_rename_partition_authorization org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_authorization_2 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_authorization_6 org.apache.hadoop.hive.cli.TestMinimrCliDriver.testCliDriver_schemeAuthority org.apache.hadoop.hive.cli.TestNegativeCliDriver.testNegativeCliDriver_authorization_fail_4 org.apache.hadoop.hive.cli.TestNegativeCliDriver.testNegativeCliDriver_authorization_fail_5 org.apache.hadoop.hive.cli.TestNegativeCliDriver.testNegativeCliDriver_authorization_part Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/920/testReport Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/920/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: 7 tests failed This message is automatically generated. ATTACHMENT ID: 12623061
          Hide
          Navis added a comment -

          Running preliminary test.

          Show
          Navis added a comment - Running preliminary test.

            People

            • Assignee:
              Navis
              Reporter:
              Navis
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development