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

Truncate on temporary table fails with "table not found" error.

    XMLWordPrintableJSON

Details

    Description

      Queries:
      create temporary table s10k as select * from studenttab10k;
      truncate table s10k;

      Truncate table query on temporary table failing with error:
      Error: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Exception while processing (state=08S01,code=1)
      From hsi logs:

      NoSuchObjectException(message:default.s10k table not found)
      	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.get_table_core(HiveMetaStore.java:2118)
      	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.truncate_table(HiveMetaStore.java:2008)
      	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.$Proxy31.truncate_table(Unknown Source)
      	at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.truncateTable(HiveMetaStoreClient.java:1115)
      	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.$Proxy32.truncateTable(Unknown Source)
      	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.HiveMetaStoreClient$SynchronizedHandler.invoke(HiveMetaStoreClient.java:2306)
      	at com.sun.proxy.$Proxy32.truncateTable(Unknown Source)
      	at org.apache.hadoop.hive.ql.metadata.Hive.truncateTable(Hive.java:1217)
      	at org.apache.hadoop.hive.ql.exec.DDLTask.truncateTable(DDLTask.java:4462)
      	at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:556)
      	at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:197)
      	at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:100)
      	at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1905)
      	at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1607)
      	at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1354)
      	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1123)
      	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1116)
      	at org.apache.hive.service.cli.operation.SQLOperation.runQuery(SQLOperation.java:242)
      	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:334)
      	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:1866)
      	at org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork.run(SQLOperation.java:348)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	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)
      

      Attachments

        1. HIVE-16678.02.patch
          11 kB
          Sankar Hariappan
        2. HIVE-16678.01.patch
          7 kB
          Sankar Hariappan

        Issue Links

          Activity

            People

              sankarh Sankar Hariappan
              sankarh Sankar Hariappan
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: