Skip to content

Commit

Permalink
Bind Metastore Cache Invalidation Procedure with Iceberg Connector
Browse files Browse the repository at this point in the history
  • Loading branch information
imjalpreet committed Jan 24, 2025
1 parent 5860e1e commit 748d64a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
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.InvalidateMetastoreCacheProcedure;
import com.facebook.presto.iceberg.nessie.IcebergNessieConfig;
import com.facebook.presto.iceberg.optimizer.IcebergPlanOptimizerProvider;
import com.facebook.presto.iceberg.procedure.ExpireSnapshotsProcedure;
Expand Down Expand Up @@ -116,7 +117,7 @@ public IcebergCommonModule(String connectorId)
}

@Override
public void setup(Binder binder)
protected void setup(Binder binder)
{
binder.bind(HdfsEnvironment.class).in(Scopes.SINGLETON);
configBinder(binder).bindConfig(CacheConfig.class);
Expand Down Expand Up @@ -168,6 +169,10 @@ public void setup(Binder binder)
procedures.addBinding().toProvider(SetCurrentSnapshotProcedure.class).in(Scopes.SINGLETON);
procedures.addBinding().toProvider(SetTablePropertyProcedure.class).in(Scopes.SINGLETON);

if (buildConfigObject(MetastoreClientConfig.class).isInvalidateMetastoreCacheProcedureEnabled()) {
procedures.addBinding().toProvider(InvalidateMetastoreCacheProcedure.class).in(Scopes.SINGLETON);
}

// for orc
binder.bind(EncryptionLibrary.class).annotatedWith(HiveDwrfEncryptionProvider.ForCryptoService.class).to(UnsupportedEncryptionLibrary.class).in(Scopes.SINGLETON);
binder.bind(EncryptionLibrary.class).annotatedWith(HiveDwrfEncryptionProvider.ForUnknown.class).to(UnsupportedEncryptionLibrary.class).in(Scopes.SINGLETON);
Expand Down

0 comments on commit 748d64a

Please sign in to comment.