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

Exchange Partition between filesystems throws "IllegalArgumentException Wrong FS"

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsAdd voteVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      The following query: alter table s3_tbl exchange partition (country='USA') with table hdfs_tbl fails with the following exception:

      Error: org.apache.hive.service.cli.HiveSQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:Got exception: java.lang.IllegalArgumentException Wrong FS: s3a://[bucket]/table/country=USA, expected: file:///)
      	at org.apache.hive.service.cli.operation.Operation.toSQLException(Operation.java:379)
      	at org.apache.hive.service.cli.operation.SQLOperation.runQuery(SQLOperation.java:256)
      	at org.apache.hive.service.cli.operation.SQLOperation.access$800(SQLOperation.java:91)
      	at org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork$1.run(SQLOperation.java:347)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at javax.security.auth.Subject.doAs(Subject.java:422)
      	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
      	at org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork.run(SQLOperation.java:361)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: java.lang.IllegalArgumentException Wrong FS: s3a://[bucket]/table/country=USA, expected: file:///)
      	at org.apache.hadoop.hive.ql.metadata.Hive.exchangeTablePartitions(Hive.java:3553)
      	at org.apache.hadoop.hive.ql.exec.DDLTask.exchangeTablePartition(DDLTask.java:4691)
      	at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:570)
      	at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:199)
      	at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:100)
      	at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:2182)
      	at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1838)
      	at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1525)
      	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1236)
      	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1231)
      	at org.apache.hive.service.cli.operation.SQLOperation.runQuery(SQLOperation.java:254)
      	... 11 more
      Caused by: MetaException(message:Got exception: java.lang.IllegalArgumentException Wrong FS: s3a://[bucket]/table/country=USA, expected: file:///)
      	at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:1387)
      	at org.apache.hadoop.hive.metastore.Warehouse.renameDir(Warehouse.java:208)
      	at org.apache.hadoop.hive.metastore.Warehouse.renameDir(Warehouse.java:200)
      	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.exchange_partitions(HiveMetaStore.java:2967)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:148)
      	at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:107)
      	at com.sun.proxy.$Proxy28.exchange_partitions(Unknown Source)
      	at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.exchange_partitions(HiveMetaStoreClient.java:690)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:173)
      	at com.sun.proxy.$Proxy29.exchange_partitions(Unknown Source)
      	at org.apache.hadoop.hive.ql.metadata.Hive.exchangeTablePartitions(Hive.java:3546)
      	... 21 more (state=08S01,code=1)
      

      Attachments

        1. HIVE-16277.1.patch
          600 kB
          Sahil Takiar
        2. HIVE-16277.2.patch
          604 kB
          Sahil Takiar
        3. HIVE-16277.3.patch
          609 kB
          Sahil Takiar
        4. HIVE-16277.4.patch
          612 kB
          Sahil Takiar

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            stakiar Sahil Takiar Assign to me
            stakiar Sahil Takiar

            Dates

              Created:
              Updated:

              Slack

                Issue deployment