diff --git a/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/event/MetastoreEvent.java b/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/event/MetastoreEvent.java index 29d6a312ea12e3..3fbccd26c1f553 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/event/MetastoreEvent.java +++ b/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/event/MetastoreEvent.java @@ -17,6 +17,7 @@ package org.apache.doris.datasource.hive.event; +import org.apache.commons.lang3.StringUtils; import org.apache.hadoop.hive.metastore.api.NotificationEvent; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -75,7 +76,9 @@ protected MetastoreEvent(long eventId, String catalogName, String dbName, protected MetastoreEvent(NotificationEvent event, String catalogName) { this.event = event; - this.dbName = event.getDbName().toLowerCase(Locale.ROOT); + // Some events that we don't care about, dbName may be empty + String eventDbName = event.getDbName(); + this.dbName = StringUtils.isEmpty(eventDbName) ? eventDbName : eventDbName.toLowerCase(Locale.ROOT); this.tblName = event.getTableName(); this.eventId = event.getEventId(); this.eventTime = event.getEventTime() * 1000L;