Skip to content

Commit

Permalink
Add InMemory CachingHiveMetastore
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaygeorge committed Mar 22, 2024
1 parent 0868131 commit 621f7b3
Show file tree
Hide file tree
Showing 16 changed files with 75 additions and 341 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
import com.facebook.presto.hive.gcs.GcsConfigurationInitializer;
import com.facebook.presto.hive.gcs.HiveGcsConfig;
import com.facebook.presto.hive.gcs.HiveGcsConfigurationInitializer;
import com.facebook.presto.hive.metastore.CachingHiveMetastore;
import com.facebook.presto.hive.metastore.ExtendedHiveMetastore;
import com.facebook.presto.hive.metastore.HiveMetastoreCacheStats;
import com.facebook.presto.hive.metastore.HivePartitionMutator;
import com.facebook.presto.hive.metastore.InMemoryCachingHiveMetastore;
import com.facebook.presto.hive.metastore.MetastoreCacheStats;
import com.facebook.presto.hive.metastore.MetastoreConfig;
import com.fasterxml.jackson.databind.DeserializationContext;
Expand Down Expand Up @@ -103,7 +103,7 @@ public void configure(Binder binder)
configBinder(binder).bindConfig(MetastoreClientConfig.class);
binder.bind(MetastoreCacheStats.class).to(HiveMetastoreCacheStats.class).in(Scopes.SINGLETON);
newExporter(binder).export(MetastoreCacheStats.class).as(generatedNameOf(MetastoreCacheStats.class, connectorId));
binder.bind(ExtendedHiveMetastore.class).to(CachingHiveMetastore.class).in(Scopes.SINGLETON);
binder.bind(ExtendedHiveMetastore.class).to(InMemoryCachingHiveMetastore.class).in(Scopes.SINGLETON);
binder.bind(HdfsConfiguration.class).annotatedWith(ForMetastoreHdfsEnvironment.class).to(HiveCachingHdfsConfiguration.class).in(Scopes.SINGLETON);

configBinder(binder).bindConfig(HiveGcsConfig.class);
Expand Down
Loading

0 comments on commit 621f7b3

Please sign in to comment.