@ -236,7 +236,7 @@ public abstract class ExternalCatalog
|
||||
name,
|
||||
OptionalLong.of(86400L),
|
||||
OptionalLong.of(Config.external_cache_expire_time_minutes_after_access * 60L),
|
||||
Config.max_hive_table_cache_num,
|
||||
Config.max_meta_object_cache_num,
|
||||
ignored -> getFilteredDatabaseNames(),
|
||||
dbName -> Optional.ofNullable(
|
||||
buildDbForInit(dbName, Util.genIdByName(name, dbName), logType)),
|
||||
@ -667,8 +667,6 @@ public abstract class ExternalCatalog
|
||||
return new IcebergExternalDatabase(this, dbId, dbName);
|
||||
case MAX_COMPUTE:
|
||||
return new MaxComputeExternalDatabase(this, dbId, dbName);
|
||||
//case HUDI:
|
||||
//return new HudiExternalDatabase(this, dbId, dbName);
|
||||
case TEST:
|
||||
return new TestExternalDatabase(this, dbId, dbName);
|
||||
case PAIMON:
|
||||
|
||||
@ -145,7 +145,7 @@ public abstract class ExternalDatabase<T extends ExternalTable>
|
||||
name,
|
||||
OptionalLong.of(86400L),
|
||||
OptionalLong.of(Config.external_cache_expire_time_minutes_after_access * 60L),
|
||||
Config.max_hive_table_cache_num,
|
||||
Config.max_meta_object_cache_num,
|
||||
ignored -> listTableNames(),
|
||||
tableName -> Optional.ofNullable(
|
||||
buildTableForInit(tableName,
|
||||
|
||||
@ -179,7 +179,7 @@ public class HiveMetaStoreCache {
|
||||
|
||||
CacheFactory fileCacheFactory = new CacheFactory(
|
||||
OptionalLong.of(fileMetaCacheTtlSecond >= HMSExternalCatalog.FILE_META_CACHE_TTL_DISABLE_CACHE
|
||||
? fileMetaCacheTtlSecond : 86400L),
|
||||
? fileMetaCacheTtlSecond : 28800L),
|
||||
OptionalLong.of(Config.external_cache_expire_time_minutes_after_access * 60L),
|
||||
Config.max_external_file_cache_num,
|
||||
false,
|
||||
|
||||
@ -52,9 +52,9 @@ public class HudiCachedPartitionProcessor extends HudiPartitionProcessor {
|
||||
this.catalogId = catalogId;
|
||||
this.executor = executor;
|
||||
CacheFactory partitionCacheFactory = new CacheFactory(
|
||||
OptionalLong.of(86400L),
|
||||
OptionalLong.of(28800L),
|
||||
OptionalLong.of(Config.external_cache_expire_time_minutes_after_access * 60),
|
||||
Config.max_hive_table_cache_num,
|
||||
Config.max_external_table_cache_num,
|
||||
false,
|
||||
null);
|
||||
this.partitionCache = partitionCacheFactory.buildCache(key -> new TablePartitionValues(), null, executor);
|
||||
|
||||
@ -55,17 +55,17 @@ public class IcebergMetadataCache {
|
||||
|
||||
public IcebergMetadataCache(ExecutorService executor) {
|
||||
CacheFactory snapshotListCacheFactory = new CacheFactory(
|
||||
OptionalLong.of(86400L),
|
||||
OptionalLong.of(28800L),
|
||||
OptionalLong.of(Config.external_cache_expire_time_minutes_after_access * 60),
|
||||
Config.max_hive_table_cache_num,
|
||||
Config.max_external_table_cache_num,
|
||||
false,
|
||||
null);
|
||||
this.snapshotListCache = snapshotListCacheFactory.buildCache(key -> loadSnapshots(key), null, executor);
|
||||
|
||||
CacheFactory tableCacheFactory = new CacheFactory(
|
||||
OptionalLong.of(86400L),
|
||||
OptionalLong.of(28800L),
|
||||
OptionalLong.of(Config.external_cache_expire_time_minutes_after_access * 60),
|
||||
Config.max_hive_table_cache_num,
|
||||
Config.max_external_table_cache_num,
|
||||
false,
|
||||
null);
|
||||
this.tableCache = tableCacheFactory.buildCache(key -> loadTable(key), null, executor);
|
||||
|
||||
@ -57,7 +57,7 @@ public class MetaCache<T> {
|
||||
CacheFactory namesCacheFactory = new CacheFactory(
|
||||
expireAfterWriteSec,
|
||||
refreshAfterWriteSec,
|
||||
maxSize,
|
||||
1, // names cache has one and only one entry
|
||||
true,
|
||||
null);
|
||||
CacheFactory objCacheFactory = new CacheFactory(
|
||||
|
||||
Reference in New Issue
Block a user