diff --git a/hudi-sync/hudi-sync-common/src/main/java/org/apache/hudi/sync/common/util/SyncUtilHelpers.java b/hudi-sync/hudi-sync-common/src/main/java/org/apache/hudi/sync/common/util/SyncUtilHelpers.java index 1427eb2887dbe..57db00ab98e05 100644 --- a/hudi-sync/hudi-sync-common/src/main/java/org/apache/hudi/sync/common/util/SyncUtilHelpers.java +++ b/hudi-sync/hudi-sync-common/src/main/java/org/apache/hudi/sync/common/util/SyncUtilHelpers.java @@ -27,6 +27,8 @@ import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; +import org.apache.log4j.LogManager; +import org.apache.log4j.Logger; import java.util.Properties; @@ -34,7 +36,7 @@ * Helper class for syncing Hudi commit data with external metastores. */ public class SyncUtilHelpers { - + private static final Logger LOG = LogManager.getLogger(SyncUtilHelpers.class); /** * Create an instance of an implementation of {@link HoodieSyncTool} that will sync all the relevant meta information * with an external metastore such as Hive etc. to ensure Hoodie tables can be queried or read via external systems. @@ -69,6 +71,10 @@ static HoodieSyncTool instantiateMetaSyncTool(String syncToolClassName, properties.putAll(props); properties.put(HoodieSyncConfig.META_SYNC_BASE_PATH.key(), targetBasePath); properties.put(HoodieSyncConfig.META_SYNC_BASE_FILE_FORMAT.key(), baseFileFormat); + String tableName = properties.getString(HoodieSyncConfig.META_SYNC_TABLE_NAME.key()); + if (!tableName.equals(tableName.toLowerCase())) { + LOG.warn("Table name \"" + tableName + "\" contains capital letters. Your metastore may automatically convert this to lower case and can cause table not found errors during subsequent syncs."); + } if (ReflectionUtils.hasConstructor(syncToolClassName, new Class[] {Properties.class, Configuration.class})) {