Hive
  1. Hive
  2. HIVE-3846

alter view rename NPEs with authorization on.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.10.0, 0.11.0
    • Fix Version/s: 0.12.0
    • Component/s: Authorization
    • Labels:
      None
    1. HIVE-3846.2.patch.txt
      6 kB
      Teddy Choi
    2. HIVE-3846.1.patch.txt
      2 kB
      Teddy Choi

      Activity

      Hide
      Ashutosh Chauhan added a comment -

      This issue has been fixed and released as part of 0.12 release. If you find further issues, please create a new jira and link it to this one.

      Show
      Ashutosh Chauhan added a comment - This issue has been fixed and released as part of 0.12 release. If you find further issues, please create a new jira and link it to this one.
      Hide
      Hudson added a comment -

      Integrated in Hive-trunk-hadoop2 #224 (See https://builds.apache.org/job/Hive-trunk-hadoop2/224/)
      HIVE-3846 : alter view rename NPEs with authorization on. (Teddy Choi via Ashutosh Chauhan) (Revision 1489009)

      Result = FAILURE
      hashutosh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1489009
      Files :

      • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java
      • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java
      • /hive/trunk/ql/src/test/queries/clientpositive/authorization_8.q
      • /hive/trunk/ql/src/test/results/clientnegative/recursive_view.q.out
      • /hive/trunk/ql/src/test/results/clientpositive/alter_view_rename.q.out
      • /hive/trunk/ql/src/test/results/clientpositive/authorization_8.q.out
      Show
      Hudson added a comment - Integrated in Hive-trunk-hadoop2 #224 (See https://builds.apache.org/job/Hive-trunk-hadoop2/224/ ) HIVE-3846 : alter view rename NPEs with authorization on. (Teddy Choi via Ashutosh Chauhan) (Revision 1489009) Result = FAILURE hashutosh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1489009 Files : /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java /hive/trunk/ql/src/test/queries/clientpositive/authorization_8.q /hive/trunk/ql/src/test/results/clientnegative/recursive_view.q.out /hive/trunk/ql/src/test/results/clientpositive/alter_view_rename.q.out /hive/trunk/ql/src/test/results/clientpositive/authorization_8.q.out
      Hide
      Hudson added a comment -

      Integrated in Hive-trunk-h0.21 #2126 (See https://builds.apache.org/job/Hive-trunk-h0.21/2126/)
      HIVE-3846 : alter view rename NPEs with authorization on. (Teddy Choi via Ashutosh Chauhan) (Revision 1489009)

      Result = FAILURE
      hashutosh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1489009
      Files :

      • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java
      • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java
      • /hive/trunk/ql/src/test/queries/clientpositive/authorization_8.q
      • /hive/trunk/ql/src/test/results/clientnegative/recursive_view.q.out
      • /hive/trunk/ql/src/test/results/clientpositive/alter_view_rename.q.out
      • /hive/trunk/ql/src/test/results/clientpositive/authorization_8.q.out
      Show
      Hudson added a comment - Integrated in Hive-trunk-h0.21 #2126 (See https://builds.apache.org/job/Hive-trunk-h0.21/2126/ ) HIVE-3846 : alter view rename NPEs with authorization on. (Teddy Choi via Ashutosh Chauhan) (Revision 1489009) Result = FAILURE hashutosh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1489009 Files : /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java /hive/trunk/ql/src/test/queries/clientpositive/authorization_8.q /hive/trunk/ql/src/test/results/clientnegative/recursive_view.q.out /hive/trunk/ql/src/test/results/clientpositive/alter_view_rename.q.out /hive/trunk/ql/src/test/results/clientpositive/authorization_8.q.out
      Hide
      Ashutosh Chauhan added a comment -

      Committed to trunk. Thanks, Teddy!

      Show
      Ashutosh Chauhan added a comment - Committed to trunk. Thanks, Teddy!
      Hide
      Ashutosh Chauhan added a comment -

      +1

      Show
      Ashutosh Chauhan added a comment - +1
      Hide
      Teddy Choi added a comment -

      Summary of changes

      • authorization_8.q.out is included.
      • authorization_8.q does not make other tests fail. <code>REVOKE ALL FROM USER hive_test_user; set hive.security.authorization.enabled=false;</code> is appended.
      • alter_view_rename.q.out and recursive_view.q.out is updated.
      Show
      Teddy Choi added a comment - Summary of changes authorization_8.q.out is included. authorization_8.q does not make other tests fail. <code>REVOKE ALL FROM USER hive_test_user; set hive.security.authorization.enabled=false;</code> is appended. alter_view_rename.q.out and recursive_view.q.out is updated.
      Hide
      Teddy Choi added a comment -

      I see, Ashutosh Chauhan. I'll update the patch. Thank you for your comments.

      Show
      Teddy Choi added a comment - I see, Ashutosh Chauhan . I'll update the patch. Thank you for your comments.
      Hide
      Ashutosh Chauhan added a comment -

      Few comments:

      • I think you forgot to add .q.out file in your patch.
      • In the .q testcase, can you add set hive.security.authorization.enabled=false; at the end. Otherwise, authorization will be on for rest of the tests as well.
      • Test TestCliDriver.alter_view_rename.q and TestNegativeCliDriver.recursive_view.q fails after patch. There .q.out file needs to be updated.
      Show
      Ashutosh Chauhan added a comment - Few comments: I think you forgot to add .q.out file in your patch. In the .q testcase, can you add set hive.security.authorization.enabled=false; at the end. Otherwise, authorization will be on for rest of the tests as well. Test TestCliDriver.alter_view_rename.q and TestNegativeCliDriver.recursive_view.q fails after patch. There .q.out file needs to be updated.
      Hide
      Teddy Choi added a comment -
      Show
      Teddy Choi added a comment - Review request on https://reviews.apache.org/r/10771/
      Hide
      Teddy Choi added a comment -

      HiveOperation.ALTERVIEW_RENAME was missing.

      I added it on HiveOperation and SemanticAnalyzerFactory. Also I added a test to reproduce the error as Ashutosh Chauhan mentioned and it was fixed.

      Show
      Teddy Choi added a comment - HiveOperation.ALTERVIEW_RENAME was missing. I added it on HiveOperation and SemanticAnalyzerFactory. Also I added a test to reproduce the error as Ashutosh Chauhan mentioned and it was fixed.
      Hide
      Ashutosh Chauhan added a comment -
      hive> set hive.security.authorization.enabled=true;
      hive> CREATE TABLE tbl_j5jbymsx8e (key INT, value STRING) PARTITIONED BY (ds STRING);
      hive> CREATE VIEW view_j5jbymsx8e_1 as SELECT * FROM tbl_j5jbymsx8e;
      hive> DESCRIBE view_j5jbymsx8e_1;
      hive> ALTER VIEW view_j5jbymsx8e_1 RENAME TO view_j5jbymsx8e_2;
      FAILED: NullPointerException null
      
      Show
      Ashutosh Chauhan added a comment - hive> set hive.security.authorization.enabled= true ; hive> CREATE TABLE tbl_j5jbymsx8e (key INT, value STRING) PARTITIONED BY (ds STRING); hive> CREATE VIEW view_j5jbymsx8e_1 as SELECT * FROM tbl_j5jbymsx8e; hive> DESCRIBE view_j5jbymsx8e_1; hive> ALTER VIEW view_j5jbymsx8e_1 RENAME TO view_j5jbymsx8e_2; FAILED: NullPointerException null

        People

        • Assignee:
          Teddy Choi
          Reporter:
          Ashutosh Chauhan
        • Votes:
          0 Vote for this issue
          Watchers:
          2 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Development