Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect hive.metastore-stats-cache-ttl in Glue v2 #21926

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private record FunctionKey(String databaseName, String functionName) {}
private final AtomicLong tableInvalidationCounter = new AtomicLong();
private final AtomicLong partitionInvalidationCounter = new AtomicLong();

public InMemoryGlueCache(Duration metadataCacheTtl, Duration columnStatisticsCacheTtl, long maximumSize)
public InMemoryGlueCache(Duration metadataCacheTtl, Duration statsCacheTtl, long maximumSize)
{
OptionalLong metadataCacheTtlMillis = OptionalLong.of(metadataCacheTtl.toMillis());
this.databaseNamesCache = buildCache(metadataCacheTtlMillis, maximumSize, ValueHolder::new);
Expand All @@ -87,9 +87,9 @@ public InMemoryGlueCache(Duration metadataCacheTtl, Duration columnStatisticsCac
this.allFunctionsCache = buildCache(metadataCacheTtlMillis, maximumSize, ValueHolder::new);
this.functionCache = buildCache(metadataCacheTtlMillis, maximumSize, ValueHolder::new);

OptionalLong columnStatisticsCacheTtlMillis = OptionalLong.of(metadataCacheTtl.toMillis());
this.tableColumnStatsCache = buildCache(columnStatisticsCacheTtlMillis, maximumSize, ColumnStatisticsHolder::new);
this.partitionColumnStatsCache = buildCache(columnStatisticsCacheTtlMillis, maximumSize, ColumnStatisticsHolder::new);
OptionalLong statsCacheTtlMillis = OptionalLong.of(statsCacheTtl.toMillis());
this.tableColumnStatsCache = buildCache(statsCacheTtlMillis, maximumSize, ColumnStatisticsHolder::new);
this.partitionColumnStatsCache = buildCache(statsCacheTtlMillis, maximumSize, ColumnStatisticsHolder::new);
}

@Override
Expand Down