Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-15329

NullPointerException might occur when create table

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0, 2.1.0
    • Fix Version/s: 2.3.0
    • Component/s: Metastore
    • Labels:
    • Target Version/s:

      Description

      NullPointerException might occur if table.getParameters() returns null when method isNonNativeTable is invoked in class MetaStoreUtils.

      public static boolean isNonNativeTable(Table table) {
          if (table == null) {
            return false;
          }
          return (table.getParameters().get(hive_metastoreConstants.META_TABLE_STORAGE) != null);
        }
      

      This will cause a stack trace without any suggestive information at client:

      org.apache.hadoop.hive.metastore.api.MetaException: 
      java.lang.NullPointerException
              at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$create_table_with_environment_context_result$create_table_with_environment_context_resultStandardScheme.read...
      

        Attachments

        1. HIVE-15329.1.patch
          0.7 kB
          Meilong Huang

          Activity

            People

            • Assignee:
              winningalong Meilong Huang
              Reporter:
              winningalong Meilong Huang
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: