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

Hive ERROR - while executing DDL statement

Highlighted

Hive ERROR - while executing DDL statement

New Contributor

Hi Team,

I am finding below error while executing the below hive query. This query is sent through java code.

CREATE TEMPORARY TABLE SACC_MASTER.CC_ASSETS_TS AS SELECT * FROM (SELECT ASSET_ID,SHIPD_DTS_GMT,CNTRCT_END_DTS_GMT,ACCNT_ID,ACCNT_NAME,PROD_LOB,PROD_TYPE,PROD_LINE,WARRANTY_CODE,WARRANTY_DESC,ACTIVE_FLG,ENRICHED_FLG,VALIDATE_FLG,SUPPORT_ASSIST_FLG,GROUP_ID,GROUP_NAME,SITE_ID,SITE_NAME,RGN_ABBR,RGN_DESC,SACC_LAST_UPDATED, RANK() OVER (PARTITION BY ASSET_ID ORDER BY SACC_LAST_UPDATED DESC) AS RANK FROM SACC_HISTORY.ASSETS_HISTORY ) RANKED WHERE RANKED.RANK=1 AND RANKED.ACCNT_ID IN (6083)

ERROR

7-30 05:13:29 [HLrjsXi62P] ERROR o.d.p.s.c.f.HiveOptimizedConnector -Exception executing DDL Statement java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:275)

7-30 05:13:29 [HLrjsXi62P] ERROR o.d.p.s.c.p.ReportDataController -**ERROR**: Exception while fetching report templates from distributions table or preparing hive staging table. java.lang.Exception: java.lang.Exception: java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask at org.abc.pprc.standalone.ccreports.persist.ReportGeneratorDBStore.fetchAndUpdateDistributionsTable(ReportGeneratorDBStore.java:130)

by: java.lang.Exception: java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask

I have attached the detailed logs file. please suggest with solutions

Thanking in Advance!!!

hive-logs.txt

2 REPLIES 2

Re: Hive ERROR - while executing DDL statement

New Contributor

Hi !

Could you please share the RM Application_xxxx_xxx logs for this?

Re: Hive ERROR - while executing DDL statement

Rising Star

@Shrikant BM

Can you provide output of the explain and explain formatted:

explain CREATE TEMPORARY TABLE SACC_MASTER.CC_ASSETS_TS AS SELECT * FROM (SELECT
 
ASSET_ID,SHIPD_DTS_GMT,CNTRCT_END_DTS_GMT,ACCNT_ID,ACCNT_NAME,PROD_LOB,PROD_TYPE,PROD_LINE,WARRANTY_CODE,WARRANTY_DESC,ACTIVE_FLG,ENRICHED_FLG,VALIDATE_FLG,SUPPORT_ASSIST_FLG,GROUP_ID,GROUP_NAME,SITE_ID,SITE_NAME,RGN_ABBR,RGN_DESC,SACC_LAST_UPDATED,
 RANK() OVER (PARTITION BY ASSET_ID ORDER BY SACC_LAST_UPDATED DESC) AS 
RANK FROM SACC_HISTORY.ASSETS_HISTORY ) RANKED WHERE RANKED.RANK=1 AND 
RANKED.ACCNT_ID IN (6083);

Can you try to change the execution engine to MR and run the same query?

Provide the output of following:

describe SACC_MASTER;
describe CC_ASSETS_TS;

Also the hive-logs.txt appear to the client logs.

Can you upload the hiveserver2.log file ?