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

Misleading error message with hive.metastore.limit.partition.request

    XMLWordPrintableJSON

Details

    Description

      Dropping partitions from a table fails with a misleading error message saying that "partition not found":

      0: jdbc:hive2://nightly-71x-zx-1.nightly-71x-> alter table t1p drop partition (p1>0);
      Error: Error while compiling statement: FAILED: SemanticException [Error 10006]: Partition not found (p1 > 0) (state=42000,code=10006)
      

      however the partitions exist, the real error message is visible in the HiveServer2 logs:

      Caused by: MetaException(message:Number of partitions scanned (=2) on table 't1p' exceeds limit (=1). This is controlled on the metastore server by hive.metastore.limit.partition.request.)
      	at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$get_partitions_by_expr_result$get_partitions_by_expr_resultStandardScheme.read(ThriftHiveMetastore.java) 
      ...
      

      Hive should surface the real error message to the user, that the "hive.metastore.limit.partition.request" limit has been reached.

      This happens only when "hive.metastore.limit.partition.request" is set.
      Haven't verified other types of queries, potentially other queries fail similarly.

      Attachments

        Issue Links

          Activity

            People

              dengzh Zhihua Deng
              mszurap Miklos Szurap
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m