[ 
https://issues.apache.org/jira/browse/HIVE-24501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Prasanth Jayachandran updated HIVE-24501:
-----------------------------------------
    Status: Patch Available  (was: Open)

> UpdateInputAccessTimeHook should not update stats
> -------------------------------------------------
>
>                 Key: HIVE-24501
>                 URL: https://issues.apache.org/jira/browse/HIVE-24501
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 4.0.0
>            Reporter: Prasanth Jayachandran
>            Assignee: Prasanth Jayachandran
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> UpdateInputAccessTimeHook can fail for transactional tables with following 
> exception.
> The hook should skip updating the stats and only update the access time.
> {code:java}
> ERROR : FAILED: Hive Internal Error: 
> org.apache.hadoop.hive.ql.metadata.HiveException(Unable to alter table. 
> Cannot change stats state for a transactional table default.test without 
> providing the transactional write state for verification (new write ID 0, 
> valid write IDs default.test:8:9223372036854775807::1,2,3,4,7; current state 
> {"BASIC_STATS":"true","COLUMN_STATS":{"id":"true","name":"true"}}; new state 
> null)ERROR : FAILED: Hive Internal Error: 
> org.apache.hadoop.hive.ql.metadata.HiveException(Unable to alter table. 
> Cannot change stats state for a transactional table default.test without 
> providing the transactional write state for verification (new write ID 0, 
> valid write IDs default.test:8:9223372036854775807::1,2,3,4,7; current state 
> {"BASIC_STATS":"true","COLUMN_STATS":{"id":"true","name":"true"}}; new state 
> null)org.apache.hadoop.hive.ql.metadata.HiveException: Unable to alter table. 
> Cannot change stats state for a transactional table default.test without 
> providing the transactional write state for verification (new write ID 0, 
> valid write IDs default.test:8:9223372036854775807::1,2,3,4,7; current state 
> {"BASIC_STATS":"true","COLUMN_STATS":{"id":"true","name":"true"}}; new state 
> null at org.apache.hadoop.hive.ql.metadata.Hive.alterTable(Hive.java:821) at 
> org.apache.hadoop.hive.ql.metadata.Hive.alterTable(Hive.java:769) at 
> org.apache.hadoop.hive.ql.metadata.Hive.alterTable(Hive.java:756) at 
> org.apache.hadoop.hive.ql.hooks.UpdateInputAccessTimeHook$PreExec.run(UpdateInputAccessTimeHook.java:70)
>  at 
> org.apache.hadoop.hive.ql.HookRunner.invokeGeneralHook(HookRunner.java:296) 
> at org.apache.hadoop.hive.ql.HookRunner.runPreHooks(HookRunner.java:273) at 
> org.apache.hadoop.hive.ql.Executor.preExecutionActions(Executor.java:155) at 
> org.apache.hadoop.hive.ql.Executor.execute(Executor.java:107) at 
> org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:721) at 
> org.apache.hadoop.hive.ql.Driver.run(Driver.java:488) at 
> org.apache.hadoop.hive.ql.Driver.run(Driver.java:482) at 
> org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:166) at 
> org.apache.hive.service.cli.operation.SQLOperation.runQuery(SQLOperation.java:225)
>  at 
> org.apache.hive.service.cli.operation.SQLOperation.access$700(SQLOperation.java:87)
>  at 
> org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork$1.run(SQLOperation.java:322)
>  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:1876)
>  at 
> org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork.run(SQLOperation.java:340)
>  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:1149)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>  at java.lang.Thread.run(Thread.java:748)Caused by: 
> MetaException(message:Cannot change stats state for a transactional table 
> default.test without providing the transactional write state for verification 
> (new write ID 0, valid write IDs 
> default.test:8:9223372036854775807::1,2,3,4,7; current state 
> {"BASIC_STATS":"true","COLUMN_STATS":{"id":"true","name":"true"}}; new state 
> null) at 
> org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$alter_table_req_result$alter_table_req_resultStandardScheme.read(ThriftHiveMetastore.java)
>  at 
> org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$alter_table_req_result$alter_table_req_resultStandardScheme.read(ThriftHiveMetastore.java)
>  at 
> org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$alter_table_req_result.read(ThriftHiveMetastore.java)
>  at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:86) at 
> org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.recv_alter_table_req(ThriftHiveMetastore.java:2584)
>  at 
> org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.alter_table_req(ThriftHiveMetastore.java:2571)
>  at 
> org.apache.hadoop.hive.metastore.HiveMetaStoreClient.alter_table(HiveMetaStoreClient.java:487)
>  at 
> org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.alter_table(SessionHiveMetaStoreClient.java:453)
>  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:212)
>  at com.sun.proxy.$Proxy35.alter_table(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:3411)
>  at com.sun.proxy.$Proxy35.alter_table(Unknown Source) at 
> org.apache.hadoop.hive.ql.metadata.Hive.alterTable(Hive.java:817) ... 25 more 
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to