需要嘲笑吗pyhive.exc.operational公司

2024-04-20 08:31:42 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在使用pyhive模块与配置单元通信。我正在尝试重新创建prod env中发生的相同异常。我可以理解查询时任何连接/事务错误都会发生操作错误蜂巢。但是我想知道它发生的确切原因。你知道吗

是否有任何方法可以在配置单元端模拟此错误(即运行错误的查询)?这样我就可以清楚地知道这个问题是由于PyHive端(即cursor对象)的死锁还是Hive服务器端的死锁(即Hive连接)

class OperationalError(DatabaseError):
"""Exception raised for errors that are related to the database's operation and not necessarily
    under the control of the programmer, e.g. an unexpected disconnect occurs, the data source name
    is not found, a transaction could not be processed, a memory allocation error occurred during
    processing, etc.
    """
    pass

例外情况:

     pyhive.exc.OperationalError: TExecuteStatementResp(status=TStatus(sqlState='08S01', infoMessages=['*org.apache.hive.service.cli.HiveSQLException:Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.spark.SparkTask:17:16', 'org.apache.hive.service.cli.operation.Operation:toSQLException:Operation.java:400', 'org.apache.hive.service.cli.operation.SQLOperation:runQuery:SQLOperation.java:239', 'org.apache.hive.service.cli.operation.SQLOperation:runInternal:SQLOperation.java:269', 'org.apache.hive.service.cli.operation.Operation:run:Operation.java:337', 'org.apache.hive.service.cli.session.HiveSessionImpl:executeStatementInternal:HiveSessionImpl.java:439', 'org.apache.hive.service.cli.session.HiveSessionImpl:executeStatement:HiveSessionImpl.java:405', 'org.apache.hive.service.cli.CLIService:executeStatement:CLIService.java:257', 'org.apache.hive.service.cli.thrift.ThriftCLIService:ExecuteStatement:ThriftCLIService.java:501', 'org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement:getResult:TCLIService.java:1313', 'org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement:getResult:TCLIService.java:1298', 'org.apache.thrift.ProcessFunction:process:ProcessFunction.java:39', 'org.apache.thrift.TBaseProcessor:process:TBaseProcessor.java:39', 'org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge$Server$TUGIAssumingProcessor:process:HadoopThriftAuthBridge.java:746', 'org.apache.thrift.server.TThreadPoolServer$WorkerProcess:run:TThreadPoolServer.java:286', 'java.util.concurrent.ThreadPoolExecutor:runWorker:ThreadPoolExecutor.java:1149', 'java.util.concurrent.ThreadPoolExecutor$Worker:run:ThreadPoolExecutor.java:624', 'java.lang.Thread:run:Thread.java:748'], statusCode=3, errorCode=1, errorMessage='Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.spark.SparkTask'), operationHandle=None)

Tags: therunorgcliapache错误serviceerror