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

INSERT dynamic partition on S3 fails with a MoveTask failure

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.2.0
    • 2.3.0
    • Hive
    • None

    Description

      The following failure is due to the patch that merges two MoveTask found on the ConditionalTask (See HIVE-15114)

      Repro steps

      CREATE EXTERNAL TABLE external_1k0jU (name STRING, age INT) PARTITIONED BY (country STRING, state STRING);
      ALTER TABLE external_1k0jU ADD PARTITION (COUNTRY='USA', STATE='CA');
      INSERT INTO external_1k0jU PARTITION (country='USA', state='CA') values ('John Doe', 23), ('Jane Doe', 22);
      CREATE EXTERNAL TABLE external_P3kiT (name STRING, age INT) PARTITIONED BY (country STRING, state STRING) location 's3a://hive-on-s3/foo/bar/';
      set hive.exec.dynamic.partition.mode=nonstrict;
      INSERT INTO TABLE external_P3kiT PARTITION (country, state) SELECT * FROM external_1k0jU;

      Error & stack trace

      ERROR : FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask
      INFO : MapReduce Jobs Launched:
      INFO : Stage-Stage-1: Map: 1 Cumulative CPU: 3.64 sec HDFS Read: 3656 HDFS Write: 99 SUCCESS
      INFO : Total MapReduce CPU Time Spent: 3 seconds 640 msec
      INFO : Completed executing command(queryId=hive_20161201113939_d64df5d7-a4c4-4885-846f-10f0223fcf4c); Time taken: 23.227 seconds
      Error: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask (state=08S01,code=1)

      INFO : Loading data to table default.external_p3kit partition (country=null, state=null) from s3a://hive-on-s3/foo/bar/.hive-staging_hive_2016-12-01_11-39-48_741_6724911837889341086-13/-ext-10002

      ERROR : Failed with exception MetaException(message:Invalid partition key & values; keys [country, state, ], values [])
      org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Invalid partition key & values; keys [country, state, ], values [])
      	at org.apache.hadoop.hive.ql.metadata.Hive.getPartition(Hive.java:1902)
      	at org.apache.hadoop.hive.ql.metadata.Hive.getPartition(Hive.java:1834)
      	at org.apache.hadoop.hive.ql.metadata.Hive.loadPartition(Hive.java:1428)
      	at org.apache.hadoop.hive.ql.metadata.Hive.loadPartition(Hive.java:1388)
      	at org.apache.hadoop.hive.ql.exec.MoveTask.execute(MoveTask.java:453)
      	at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:214)
      	at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:100)
      	at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1976)
      	at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1689)
      	at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1421)
      	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1205)
      	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1200)
      	at org.apache.hive.service.cli.operation.SQLOperation.runQuery(SQLOperation.java:237)
      	at org.apache.hive.service.cli.operation.SQLOperation.access$300(SQLOperation.java:88)
      	at org.apache.hive.service.cli.operation.SQLOperation$3$1.run(SQLOperation.java:293)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at javax.security.auth.Subject.doAs(Subject.java:415)
      	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1796)
      	at org.apache.hive.service.cli.operation.SQLOperation$3.run(SQLOperation.java:306)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: MetaException(message:Invalid partition key & values; keys [country, state, ], values [])
      	at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$get_partition_with_auth_result$get_partition_with_auth_resultStandardScheme.read(ThriftHiveMetastore.java:65142)
      	at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$get_partition_with_auth_result$get_partition_with_auth_resultStandardScheme.read(ThriftHiveMetastore.java:65119)
      	at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$get_partition_with_auth_result.read(ThriftHiveMetastore.java:65050)
      	at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:86)
      	at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.recv_get_partition_with_auth(ThriftHiveMetastore.java:2007)
      	at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.get_partition_with_auth(ThriftHiveMetastore.java:1990)
      	at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getPartitionWithAuthInfo(HiveMetaStoreClient.java:1210)
      	at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
      	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:105)
      	at com.sun.proxy.$Proxy18.getPartitionWithAuthInfo(Unknown Source)
      	at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
      	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:2032)
      	at com.sun.proxy.$Proxy18.getPartitionWithAuthInfo(Unknown Source)
      	at org.apache.hadoop.hive.ql.metadata.Hive.getPartition(Hive.java:1893)
      	... 23 more
      

      Attachments

        1. HIVE-15361.1.patch
          88 kB
          Sergio Peña
        2. HIVE-15361.2.patch
          90 kB
          Sergio Peña
        3. HIVE-15361.3.patch
          98 kB
          Sergio Peña
        4. HIVE-15361.4.patch
          97 kB
          Sergio Peña
        5. HIVE-15361.5.patch
          97 kB
          Sergio Peña

        Issue Links

          Activity

            People

              spena Sergio Peña
              spena Sergio Peña
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: