BELUGA BEHR created HIVE-18896:
----------------------------------

             Summary: Do Not Log User Errors in SQLOperation Class
                 Key: HIVE-18896
                 URL: https://issues.apache.org/jira/browse/HIVE-18896
             Project: Hive
          Issue Type: Improvement
          Components: HiveServer2
    Affects Versions: 3.0.0, 2.4.0
            Reporter: BELUGA BEHR


[https://github.com/apache/hive/blob/f7dea1060247dddccd69112e24200ec84d2847a3/service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java#L344]
{code:java}
2018-03-05 07:00:25,920  ERROR org.apache.hive.service.cli.operation.Operation: 
[HiveServer2-Background-Pool: Thread-2412]: Error running hive query: 
org.apache.hive.service.cli.HiveSQLException: Error while processing statement: 
FAILED: Execution Error, return code 1 from 
org.apache.hadoop.hive.ql.exec.DDLTask. Unable to alter table. new table 
sales.customer_acct already exists
        at 
org.apache.hive.service.cli.operation.Operation.toSQLException(Operation.java:399)
        at 
org.apache.hive.service.cli.operation.SQLOperation.runQuery(SQLOperation.java:189)
        at 
org.apache.hive.service.cli.operation.SQLOperation.access$100(SQLOperation.java:76)
        at 
org.apache.hive.service.cli.operation.SQLOperation$2$1.run(SQLOperation.java:241)
        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:1714)
        at 
org.apache.hive.service.cli.operation.SQLOperation$2.run(SQLOperation.java:254)
        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: Unable to alter 
table. new table sales.customer_acct already exists
        at org.apache.hadoop.hive.ql.metadata.Hive.alterTable(Hive.java:556)
        at org.apache.hadoop.hive.ql.exec.DDLTask.alterTable(DDLTask.java:3379)
        at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:340)
        at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:212)
        at 
org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:100)
        at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1969)
        at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1682)
        at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1419)
        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1203)
        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1198)
        at 
org.apache.hive.service.cli.operation.SQLOperation.runQuery(SQLOperation.java:187)
        ... 11 more
Caused by: InvalidOperationException(message:new table sales.customer_acct 
already exists)
        at 
org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$alter_table_with_cascade_result$alter_table_with_cascade_resultStandardScheme.read(ThriftHiveMetastore.java:42276)
        at 
org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$alter_table_with_cascade_result$alter_table_with_cascade_resultStandardScheme.read(ThriftHiveMetastore.java:42262)
        at 
org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$alter_table_with_cascade_result.read(ThriftHiveMetastore.java:42204)
        at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:86)
        at 
org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.recv_alter_table_with_cascade(ThriftHiveMetastore.java:1410)
        at 
org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.alter_table_with_cascade(ThriftHiveMetastore.java:1394)
        at 
org.apache.hadoop.hive.metastore.HiveMetaStoreClient.alter_table(HiveMetaStoreClient.java:350)
        at 
org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.alter_table(SessionHiveMetaStoreClient.java:296)
        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:105)
        at com.sun.proxy.$Proxy11.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:2032)
        at com.sun.proxy.$Proxy11.alter_table(Unknown Source)
        at org.apache.hadoop.hive.ql.metadata.Hive.alterTable(Hive.java:552)
        ... 21 more
{code}
This is a huge and ugly _ERROR_ level stack trace for something that a Hive 
service administrator could care less about. For tracing purposes, the HS2 
should log that the query terminated with a failure condition, but it should be 
a simple, concise, message at the _INFO_ logging level.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to