Skip to content
Closed
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 @@ -276,16 +276,6 @@ protected CachingHiveMetastore(HiveMetastore delegate, OptionalLong expiresAfter
partitionCache = partitionCacheFactory.buildCache(this::loadPartitionByName, this::loadPartitionsByNames);
}

private static <K, V> LoadingCache<K, V> neverCache(com.google.common.base.Function<K, V> loader)
{
return buildCache(OptionalLong.of(0), OptionalLong.empty(), Optional.empty(), 0, StatsRecording.DISABLED, loader);
}

private static <K, V> LoadingCache<K, V> neverCache(Function<K, V> loader, Function<Iterable<K>, Map<K, V>> bulkLoader)
{
return buildCache(OptionalLong.of(0), 0, StatsRecording.DISABLED, loader, bulkLoader);
}

@Managed
public void flushCache()
{
Expand Down Expand Up @@ -1141,20 +1131,12 @@ public <K, V> LoadingCache<K, V> buildCache(com.google.common.base.Function<K, V

private static CacheFactory neverCacheFactory()
{
return new CacheFactory()
{
@Override
public <K, V> LoadingCache<K, V> buildCache(com.google.common.base.Function<K, V> loader)
{
return neverCache(loader);
}

@Override
public <K, V> LoadingCache<K, V> buildCache(com.google.common.base.Function<K, V> loader, Function<Iterable<K>, Map<K, V>> bulkLoader)
{
return neverCache(loader, bulkLoader);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neverCache are no longer used I think

}
};
return cacheFactory(
OptionalLong.of(0),
OptionalLong.empty(),
Optional.empty(),
0,
StatsRecording.DISABLED);
}

private static <K, V> LoadingCache<K, V> buildCache(
Expand Down