You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Quanlong Huang (Jira)" <ji...@apache.org> on 2023/04/23 03:12:00 UTC

[jira] [Created] (IMPALA-12082) INVALIDATE METADATA on new table fail if db is not loaded

Quanlong Huang created IMPALA-12082:
---------------------------------------

             Summary: INVALIDATE METADATA on new table fail if db is not loaded
                 Key: IMPALA-12082
                 URL: https://issues.apache.org/jira/browse/IMPALA-12082
             Project: IMPALA
          Issue Type: Bug
          Components: Catalog
            Reporter: Quanlong Huang
            Assignee: Quanlong Huang


This is a regression caused by IMPALA-11808. We used to support the following use case:
 * HMS event-processor is disabled.
 * User creates a new db and a new table in it using Hive.
 * User runs "INVALIDATE METADATA newdb.newtbl" in Impala to bring it up.

However, after IMPALA-11808, the IM command fails with DatabaseNotFoundException.
{code:sql}
# Start Impala cluster with --hms_event_polling_interval_s=0
bin/start-impala-cluster.py --catalogd_args=--hms_event_polling_interval_s=0

# Create new db and new table in Hive
beeline -u "jdbc:hive2://localhost:11050"
> create database mydb;
> create table mydb.mytbl (i int);

# Run IM in Impala
impala-shell.sh
> invalidate metadata mydb.mytbl;
ERROR: DatabaseNotFoundException: Database 'mydb' not found{code}
Here is the exception in catalogd logs:
{code:java}
E0423 11:06:22.301990  3215 JniUtil.java:183] Error in INVALIDATE TABLE mydb.mytbl issued by quanlong. Time spent: 6ms
I0423 11:06:22.302635  3215 jni-util.cc:288] org.apache.impala.catalog.DatabaseNotFoundException: Database 'mydb' not found
        at org.apache.impala.catalog.Catalog.getTable(Catalog.java:196)
        at org.apache.impala.service.CatalogOpExecutor.execResetMetadata(CatalogOpExecutor.java:6407)
        at org.apache.impala.service.JniCatalog.lambda$resetMetadata$4(JniCatalog.java:296)
        at org.apache.impala.service.JniCatalogOp.lambda$execAndSerialize$1(JniCatalogOp.java:90)
        at org.apache.impala.service.JniCatalogOp.execOp(JniCatalogOp.java:58)
        at org.apache.impala.service.JniCatalogOp.execAndSerialize(JniCatalogOp.java:89)
        at org.apache.impala.service.JniCatalogOp.execAndSerialize(JniCatalogOp.java:100)
        at org.apache.impala.service.JniCatalog.execAndSerialize(JniCatalog.java:230)
        at org.apache.impala.service.JniCatalog.resetMetadata(JniCatalog.java:295) {code}
Code snipper of where it was thrown:
{code:java}
6406       TableName tblName = TableName.fromThrift(req.getTable_name());
6407       Table tbl = catalog_.getTable(tblName.getDb(), tblName.getTbl());
6408       if (req.isIs_refresh()) { {code}
Before IMPALA-11808, getTable() is invoked inside the if-clause so won't hit this issue: [https://gerrit.cloudera.org/c/19378/17/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java#6289]

CC [~hemanth619] 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org