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

Dynamic partitioning doesn’t work when remote metastore is used

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.1.0
    • Component/s: Metastore
    • Labels:
      None
    • Environment:

      Hadoop 2.7.1

    • Target Version/s:

      Description

      Steps to reproduce:

      1. Configure remote metastore (hive.metastore.uris)
      2. Create table t1 (a string);
      3. Create table t2 (a string) partitioned by (b string);
      4. set hive.exec.dynamic.partition.mode=nonstrict;
      5. Insert overwrite table t2 partition (b) select a,a from t1;

      Result:

      FAILED: SemanticException org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.thrift.TApplicationException: getMetaConf failed: unknown result
      16/04/13 15:04:51 [c679e424-2501-4347-8146-cf1b1cae217c main]: ERROR ql.Driver: FAILED: SemanticException org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.thrift.TApplicationException: getMetaConf failed: unknown result
      org.apache.hadoop.hive.ql.parse.SemanticException: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.thrift.TApplicationException: getMetaConf failed: unknown result
              at org.apache.hadoop.hive.ql.plan.DynamicPartitionCtx.<init>(DynamicPartitionCtx.java:84)
              at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genFileSinkPlan(SemanticAnalyzer.java:6550)
              at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPostGroupByBodyPlan(SemanticAnalyzer.java:9315)
              at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genBodyPlan(SemanticAnalyzer.java:9204)
              at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:10071)
              at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:9949)
              at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genOPTree(SemanticAnalyzer.java:10607)
              at org.apache.hadoop.hive.ql.parse.CalcitePlanner.genOPTree(CalcitePlanner.java:358)
              at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:10618)
              at org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:233)
              at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:245)
              at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:476)
              at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:318)
              at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1192)
              at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1287)
              at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1118)
              at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1106)
              at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:236)
              at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:187)
              at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:403)
              at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:339)
              at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:748)
              at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:721)
              at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:648)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
              at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
      Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.thrift.TApplicationException: getMetaConf failed: unknown result
              at org.apache.hadoop.hive.ql.metadata.Hive.getMetaConf(Hive.java:3493)
              at org.apache.hadoop.hive.ql.plan.DynamicPartitionCtx.<init>(DynamicPartitionCtx.java:82)
              ... 29 more
      Caused by: org.apache.thrift.TApplicationException: getMetaConf failed: unknown result
              at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.recv_getMetaConf(ThriftHiveMetastore.java:666)
              at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.getMetaConf(ThriftHiveMetastore.java:646)
              at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getMetaConf(HiveMetaStoreClient.java:550)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:153)
              at com.sun.proxy.$Proxy20.getMetaConf(Unknown Source)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.apache.hadoop.hive.metastore.HiveMetaStoreClient$SynchronizedHandler.invoke(HiveMetaStoreClient.java:2153)
              at com.sun.proxy.$Proxy20.getMetaConf(Unknown Source)
              at org.apache.hadoop.hive.ql.metadata.Hive.getMetaConf(Hive.java:3491)
              ... 30 more
      

      During construction of DynamicPartitionCtx it tries to read “hive.metastore.partition.name.whitelist.pattern” from the metastore. If no value is configured in hive-site.xml then NULL will be returned. Thrift considers NULL as invalid result and fails with an exception.

        Attachments

        1. HIVE-13510.1.patch
          6 kB
          Illya Yalovyy
        2. HIVE-13510.2.patch
          6 kB
          Illya Yalovyy

          Issue Links

            Activity

              People

              • Assignee:
                yalovyyi Illya Yalovyy
                Reporter:
                yalovyyi Illya Yalovyy
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: