Created on 10-01-2023 04:05 AM - last edited on 10-02-2023 06:38 AM by cjervis
I was trying to use python query to extract data from Hive table and create a data frame. It gave me the following error at cursor.execute line.
pyhive.exc.OperationalError: TExecuteStatementResp(status=TStatus(statusCode=3, infoMessages=['*org.apache.hive.service.cli.HiveSQLException:Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask:17:16', 'org.apache.hive.service.cli.operation.Operation:toSQLException:Operation.java:348', 'org.apache.hive.service.cli.operation.SQLOperation:runQuery:SQLOperation.java:228', 'org.apache.hive.service.cli.operation.SQLOperation:runInternal:SQLOperation.java:265', 'org.apache.hive.service.cli.operation.Operation:run:Operation.java:260', 'org.apache.hive.service.cli.session.HiveSessionImpl:executeStatementInternal:HiveSessionImpl.java:575', 'org.apache.hive.service.cli.session.HiveSessionImpl:executeStatement:HiveSessionImpl.java:550', 'org.apache.hive.service.cli.CLIService:executeStatement:CLIService.java:285', 'org.apache.hive.service.cli.thrift.ThriftCLIService:ExecuteStatement:ThriftCLIService.java:567', 'org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement:getResult:TCLIService.java:1557', 'org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement:getResult:TCLIService.java:1542', 'org.apache.thrift.ProcessFunction:process:ProcessFunction.java:39', 'org.apache.thrift.TBaseProcessor:process:TBaseProcessor.java:39', 'org.apache.hadoop.hive.metastore.security.HadoopThriftAuthBridge$Server$TUGIAssumingProcessor:process:HadoopThriftAuthBridge.java:647', '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'], sqlState='08S01', errorCode=1, errorMessage='Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask'), operationHandle=None)
Any resolution will be great.
Created 10-02-2023 06:45 AM
Welcome to the community @New_To_Hive. While you wait form someone more knowledgable to reply, I thought I could at least point something out. I see the following
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask:17:16
I suggest double checking your Hive query for correctness and reviewing your Tez logs to see if they hold additional clues.
Created 11-21-2023 09:37 AM
The error you're encountering (OperationalError: TExecuteStatementResp(status=TStatus(statusCode=3, ...) indicates that there was an issue during the execution of the Hive query. The specific error message within the response is Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask.
Here are a few steps you can take to troubleshoot and resolve the issue:
Check Hive Query Logs:
Inspect Query Syntax:
Verify Hive Table Existence:
Check Permissions:
Examine Tez Configuration:
Look for Resource Constraints:
Update Python Library:
Test with a Simple Query:
After reviewing the logs and checking the mentioned aspects, you should have more insights into what might be causing the error. If the issue persists, consider providing more details about the Hive query and the surrounding context, so we can offer more targeted assistance.