Hive
  1. Hive
  2. HIVE-2674

get_partitions_ps throws TApplicationException if table doesn't exist

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.0
    • Component/s: Metastore
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      If the table passed to get_partition_ps doesn't exist, a NPE is thrown by getPartitionPsQueryResults. There should be a check here, which throws a NoSuchObjectException if the table doesn't exist.

        Activity

        Hide
        Hudson added a comment -

        Integrated in Hive-trunk-hadoop2 #54 (See https://builds.apache.org/job/Hive-trunk-hadoop2/54/)
        HIVE-2674 get_partitions_ps throws TApplicationException if table doesn't
        exist (Kevin Wilfong via namit) (Revision 1234065)

        Result = ABORTED
        namit : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1234065
        Files :

        • /hive/trunk/metastore/if/hive_metastore.thrift
        • /hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
        • /hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h
        • /hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
        • /hive/trunk/metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php
        • /hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
        • /hive/trunk/metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
        • /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
        • /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
        • /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
        • /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java
        • /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java
        Show
        Hudson added a comment - Integrated in Hive-trunk-hadoop2 #54 (See https://builds.apache.org/job/Hive-trunk-hadoop2/54/ ) HIVE-2674 get_partitions_ps throws TApplicationException if table doesn't exist (Kevin Wilfong via namit) (Revision 1234065) Result = ABORTED namit : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1234065 Files : /hive/trunk/metastore/if/hive_metastore.thrift /hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp /hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h /hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java /hive/trunk/metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php /hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py /hive/trunk/metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java
        Hide
        Ashutosh Chauhan added a comment -

        This issue is closed now. It was released with the fix in 0.9.0. If there is a problem, please open a new jira and link this one with that.

        Show
        Ashutosh Chauhan added a comment - This issue is closed now. It was released with the fix in 0.9.0. If there is a problem, please open a new jira and link this one with that.
        Hide
        Hudson added a comment -

        Integrated in Hive-trunk-h0.21 #1210 (See https://builds.apache.org/job/Hive-trunk-h0.21/1210/)
        HIVE-2674 get_partitions_ps throws TApplicationException if table doesn't
        exist (Kevin Wilfong via namit)

        namit : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1234065
        Files :

        • /hive/trunk/metastore/if/hive_metastore.thrift
        • /hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
        • /hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h
        • /hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
        • /hive/trunk/metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php
        • /hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
        • /hive/trunk/metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
        • /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
        • /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
        • /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
        • /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java
        • /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java
        Show
        Hudson added a comment - Integrated in Hive-trunk-h0.21 #1210 (See https://builds.apache.org/job/Hive-trunk-h0.21/1210/ ) HIVE-2674 get_partitions_ps throws TApplicationException if table doesn't exist (Kevin Wilfong via namit) namit : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1234065 Files : /hive/trunk/metastore/if/hive_metastore.thrift /hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp /hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h /hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java /hive/trunk/metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php /hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py /hive/trunk/metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java
        Hide
        Namit Jain added a comment -

        Committed. Thanks Kevin

        Show
        Namit Jain added a comment - Committed. Thanks Kevin
        Hide
        Namit Jain added a comment -

        running tests

        Show
        Namit Jain added a comment - running tests
        Hide
        Namit Jain added a comment -

        +1

        Show
        Namit Jain added a comment - +1
        Hide
        Phabricator added a comment -

        kevinwilfong updated the revision "HIVE-2674 [jira] get_partitions_ps throws TApplicationException if table doesn't exist".
        Reviewers: JIRA

        Ran svn up.

        REVISION DETAIL
        https://reviews.facebook.net/D987

        AFFECTED FILES
        metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java
        metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
        metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
        metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
        metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java
        metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
        metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
        metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h
        metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
        metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
        metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php
        metastore/if/hive_metastore.thrift

        Show
        Phabricator added a comment - kevinwilfong updated the revision " HIVE-2674 [jira] get_partitions_ps throws TApplicationException if table doesn't exist". Reviewers: JIRA Ran svn up. REVISION DETAIL https://reviews.facebook.net/D987 AFFECTED FILES metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php metastore/if/hive_metastore.thrift
        Hide
        Kevin Wilfong added a comment -

        Ran svn up, and updated the diff.

        Show
        Kevin Wilfong added a comment - Ran svn up, and updated the diff.
        Hide
        Namit Jain added a comment -

        The code changes look good, but there are a bunch of conflicts.
        Can you refresh ?

        Show
        Namit Jain added a comment - The code changes look good, but there are a bunch of conflicts. Can you refresh ?
        Hide
        Phabricator added a comment -

        kevinwilfong requested code review of "HIVE-2674 [jira] get_partitions_ps throws TApplicationException if table doesn't exist".
        Reviewers: JIRA

        getPartitionPsQueryResults now throws a NoSuchObjectException instead of a NPE if the table named does not exist. I updated all calls higher up so that the exception could propagate to Thrift client.

        If the table passed to get_partition_ps doesn't exist, a NPE is thrown by getPartitionPsQueryResults. There should be a check here, which throws a NoSuchObjectException if the table doesn't exist.

        TEST PLAN
        EMPTY

        REVISION DETAIL
        https://reviews.facebook.net/D987

        AFFECTED FILES
        metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java
        metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
        metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
        metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
        metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java
        metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
        metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
        metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h
        metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
        metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
        metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php
        metastore/if/hive_metastore.thrift

        MANAGE HERALD DIFFERENTIAL RULES
        https://reviews.facebook.net/herald/view/differential/

        WHY DID I GET THIS EMAIL?
        https://reviews.facebook.net/herald/transcript/2055/

        Tip: use the X-Herald-Rules header to filter Herald messages in your client.

        Show
        Phabricator added a comment - kevinwilfong requested code review of " HIVE-2674 [jira] get_partitions_ps throws TApplicationException if table doesn't exist". Reviewers: JIRA getPartitionPsQueryResults now throws a NoSuchObjectException instead of a NPE if the table named does not exist. I updated all calls higher up so that the exception could propagate to Thrift client. If the table passed to get_partition_ps doesn't exist, a NPE is thrown by getPartitionPsQueryResults. There should be a check here, which throws a NoSuchObjectException if the table doesn't exist. TEST PLAN EMPTY REVISION DETAIL https://reviews.facebook.net/D987 AFFECTED FILES metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php metastore/if/hive_metastore.thrift MANAGE HERALD DIFFERENTIAL RULES https://reviews.facebook.net/herald/view/differential/ WHY DID I GET THIS EMAIL? https://reviews.facebook.net/herald/transcript/2055/ Tip: use the X-Herald-Rules header to filter Herald messages in your client.

          People

          • Assignee:
            Kevin Wilfong
            Reporter:
            Kevin Wilfong
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development