hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Janus Chow (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HIVE-19994) Impala "drop table" fails with Hive Metastore exception
Date Tue, 30 Jul 2019 06:22:00 GMT

    [ https://issues.apache.org/jira/browse/HIVE-19994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16895761#comment-16895761
] 

Janus Chow edited comment on HIVE-19994 at 7/30/19 6:21 AM:
------------------------------------------------------------

BTW, after added "COLUMNS_V2_FK1", the old error disappeared, but some new errors emerged.
{code:java}
java.sql.BatchUpdateException: Cannot delete or update a parent row: a foreign key constraint
fails ("xxx"."SDS", CONSTRAINT "SDS_FK2" FOREIGN KEY ("CD_ID") REFERENCES "CDS" ("CD_ID"))
Caused by: java.sql.SQLIntegrityConstraintViolationException: Cannot delete or update a parent
row: a foreign key constraint fails ("xxx"."SDS", CONSTRAINT "SDS_FK2" FOREIGN KEY ("CD_ID")
REFERENCES "CDS" ("CD_ID"))

Caused by: java.sql.SQLIntegrityConstraintViolationException: Cannot add or update a child
row: a foreign key constraint fails ("xxx"."PARTITION_PARAMS", CONSTRAINT "PARTITION_PARAMS_FK1"
FOREIGN KEY ("PART_ID") REFERENCES "PARTITIONS" ("PART_ID"))
Caused by: java.sql.SQLIntegrityConstraintViolationException: Cannot add or update a child
row: a foreign key constraint fails ("xxx"."PARTITION_PARAMS", CONSTRAINT "PARTITION_PARAMS_FK1"
FOREIGN KEY ("PART_ID") REFERENCES "PARTITIONS" ("PART_ID"))
{code}
I was wondering if I can add a similar line under "SDS" in package.jdo.


was (Author: symious):
BTW, after added "COLUMNS_V2_FK1", the old error disappeared, but some new errors emerged.

{code:java}
java.sql.BatchUpdateException: Cannot delete or update a parent row: a foreign key constraint
fails ("xxx"."SDS", CONSTRAINT "SDS_FK2" FOREIGN KEY ("CD_ID") REFERENCES "CDS" ("CD_ID"))
Caused by: java.sql.SQLIntegrityConstraintViolationException: Cannot delete or update a parent
row: a foreign key constraint fails ("xxx"."SDS", CONSTRAINT "SDS_FK2" FOREIGN KEY ("CD_ID")
REFERENCES "CDS" ("CD_ID"))
{code}

I was wondering if I can add a similar line under "SDS" in package.jdo.


> Impala "drop table" fails with Hive Metastore exception
> -------------------------------------------------------
>
>                 Key: HIVE-19994
>                 URL: https://issues.apache.org/jira/browse/HIVE-19994
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>    Affects Versions: 1.1.0
>         Environment: Hadoop distribution: CHD 5.14.2
> Hive version:  1.1.0-cdh5.14.2
> Impala version: 2.11.0
> Kudu version: 1.6.0
>  
>            Reporter: Rodion Myronov
>            Assignee: Karthik Manamcheri
>            Priority: Major
>             Fix For: 4.0.0
>
>         Attachments: HIVE-19994.1.patch, metastore_exception.txt
>
>
> "drop table" statement in Impala shell fails with the following exception:
> {{ImpalaRuntimeException: Error making 'dropTable' RPC to Hive Metastore: CAUSED BY:
MetaException: One or more instances could not be deleted}}
>  
> Metastore log file shows that "DELETE FROM `PARTITION_KEYS` WHERE `TBL_ID`=?" statement
fails because of foreign key violation (full stacktrace will be added):
> {{Caused by: java.sql.BatchUpdateException: Cannot delete or update a parent row: a foreign
key constraint fails ("hivemetastore_emtig3vtq7qp1tiooo07sb70ud"."COLUMNS_V2", CONSTRAINT
"COLUMNS_V2_FK1" FOREIGN KEY ("CD_ID") REFERENCES "CDS" ("CD_ID"))}}
>  
> The table is created and then dropped as a part of ETL process executed every hour. Most
of the time it works fine, the issue is not reproducible at will.
> Table creation script is:
> {{CREATE TABLE IF NOT EXISTS price_advisor_ouput.t_switching_coef_source}}
> {{( }}
> {{...fields here...}}
> {{PRIMARY KEY (...PK field here...)}}
> {{)}}
> {{PARTITION BY HASH(matrix_pcd) PARTITIONS 3}}
> {{STORED AS KUDU;}}
>  
> Not sure how to approach diagnostics and fix, so any input will be really appreciated. 
> Thanks in advance, 
> Rodion Myronov



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Mime
View raw message