diff --git a/fe/src/compat-hive-3/java/org/apache/impala/compat/MetastoreShim.java b/fe/src/compat-hive-3/java/org/apache/impala/compat/MetastoreShim.java index 4a0356e6e..23fc2562b 100644 --- a/fe/src/compat-hive-3/java/org/apache/impala/compat/MetastoreShim.java +++ b/fe/src/compat-hive-3/java/org/apache/impala/compat/MetastoreShim.java @@ -487,9 +487,8 @@ public class MetastoreShim extends Hive3MetastoreShimBase { Preconditions.checkNotNull(tableName); Preconditions.checkState(!insertEventDataList.isEmpty(), "Atleast one insert event " + "info must be provided."); - LOG.debug(String.format( - "Firing %s insert event(s) for %s.%s", insertEventDataList.size(), dbName, - tableName)); + LOG.debug("Firing {} insert event(s) for {}.{}", insertEventDataList.size(), dbName, + tableName); FireEventRequestData data = new FireEventRequestData(); FireEventRequest rqst = new FireEventRequest(true, data); rqst.setDbName(dbName); diff --git a/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java b/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java index c8cdde9c8..883e21fcd 100644 --- a/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java +++ b/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java @@ -7721,6 +7721,7 @@ public class CatalogOpExecutor { } if (insertEventReqDatas.isEmpty()) return; + catalogTimeline.markEvent("Prepared InsertEvent data"); MetaStoreClient metaStoreClient = catalog_.getMetaStoreClient(catalogTimeline); TableInsertEventInfo insertEventInfo = new TableInsertEventInfo( diff --git a/tests/query_test/test_observability.py b/tests/query_test/test_observability.py index 247124c65..5394e22f5 100644 --- a/tests/query_test/test_observability.py +++ b/tests/query_test/test_observability.py @@ -547,7 +547,7 @@ class TestObservability(ImpalaTestSuite): "Didn't find event '" + regex + "' for query '" + query + \ "' in profile: \n" + runtime_profile - def test_create_table_profile_events(self, unique_database): + def test_ddl_profile_events(self, unique_database): """Test that specific DDL timeline event labels exist in the profile. Note that labels of HMS events are not used so this test is expected to pass with or without event processor enabled""" @@ -593,6 +593,15 @@ class TestObservability(ImpalaTestSuite): "Loaded file metadata for 2 partitions", "Finished updateCatalog request" ]) + # INSERT into existing partitions + stmt = "insert into %s.t1 partition(p) values (0,0), (1,1)" % unique_database + self.__verify_event_labels_in_profile(stmt, [ + "Got Metastore client", + "Prepared InsertEvent data", + "Fired Metastore events", + "Loaded file metadata for 2 partitions", + "Finished updateCatalog request" + ]) # Compute stats stmt = "compute stats %s.t1" % unique_database self.__verify_event_labels_in_profile(stmt, [