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.1.patch.txt
      2 kB
      Teddy Choi
    2. HIVE-3846.2.patch.txt
      6 kB
      Teddy Choi

      Activity

      Ashutosh Chauhan created issue -
      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
      Teddy Choi made changes -
      Field Original Value New Value
      Assignee Teddy Choi [ teddy.choi ]
      Teddy Choi made changes -
      Status Open [ 1 ] In Progress [ 3 ]
      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.
      Teddy Choi made changes -
      Attachment HIVE-3846.1.patch.txt [ 12580477 ]
      Hide
      Teddy Choi added a comment -
      Show
      Teddy Choi added a comment - Review request on https://reviews.apache.org/r/10771/
      Teddy Choi made changes -
      Status In Progress [ 3 ] Patch Available [ 10002 ]
      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 -

      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.
      Teddy Choi made changes -
      Status Patch Available [ 10002 ] In Progress [ 3 ]
      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.
      Teddy Choi made changes -
      Attachment HIVE-3846.2.patch.txt [ 12582231 ]
      Teddy Choi made changes -
      Status In Progress [ 3 ] Open [ 1 ]
      Teddy Choi made changes -
      Status Open [ 1 ] Patch Available [ 10002 ]
      Hide
      Ashutosh Chauhan added a comment -

      +1

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

      Committed to trunk. Thanks, Teddy!

      Show
      Ashutosh Chauhan added a comment - Committed to trunk. Thanks, Teddy!
      Ashutosh Chauhan made changes -
      Status Patch Available [ 10002 ] Resolved [ 5 ]
      Fix Version/s 0.12.0 [ 12324312 ]
      Resolution Fixed [ 1 ]
      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
      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
      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.
      Ashutosh Chauhan made changes -
      Status Resolved [ 5 ] Closed [ 6 ]
      Transition Time In Source Status Execution Times Last Executer Last Execution Date
      Open Open In Progress In Progress
      117d 3h 43m 1 Teddy Choi 25/Apr/13 04:17
      In Progress In Progress Patch Available Patch Available
      59m 58s 1 Teddy Choi 25/Apr/13 05:17
      Patch Available Patch Available In Progress In Progress
      21h 17m 1 Teddy Choi 26/Apr/13 02:34
      In Progress In Progress Open Open
      11d 22h 56m 1 Teddy Choi 08/May/13 01:31
      Open Open Patch Available Patch Available
      11s 1 Teddy Choi 08/May/13 01:31
      Patch Available Patch Available Resolved Resolved
      26d 13h 12m 1 Ashutosh Chauhan 03/Jun/13 14:44
      Resolved Resolved Closed Closed
      134d 8h 46m 1 Ashutosh Chauhan 15/Oct/13 23:31

        People

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

          Dates

          • Created:
            Updated:
            Resolved:

            Development