Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

return code 2 from

return code 2 from

New Contributor

Hi Team,

We need your guidance/assistance in resolving memory issues while doing a select on a table in mapreduce mode. When we do a select query on the beeline saying "select * from tableName LIMIT 5" with "set hive.fetch.task.conversion= none, we get the error:

java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 2 from
at org.apache.hive.jdbc.HiveStatement.waitForOperationToComplete(
at org.apache.hive.jdbc.HiveStatement.execute(

This is faced by one of our clients. The client contacted Hortonworks support separately and the resolution suggested to him was to use set hive.fetch.task.conversion=more. The assumption was that for just fetching the records there is no need to go into the MR Code.
However, our application needs to invoke the MR code because for some broader use cases we have to process the complete table.

We need to get your assistance as to why the above select query didn't work with hive.fetch.task.conversion= none, even with a LIMIT specified as 5. We won't be able work with hive.fetch.task.conversion=more, because we need MR code to process larger chunks of table.


Don't have an account?
Coming from Hortonworks? Activate your account here