Skip to content

Commit

Permalink
Disable generic metastore cache for Glue with internal caching
Browse files Browse the repository at this point in the history
  • Loading branch information
dain committed Mar 18, 2024
1 parent 4f996b8 commit 68e0fa8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@

public interface HiveMetastoreFactory
{
default boolean hasBuiltInCaching()
{
return false;
}

boolean isImpersonationEnabled();

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public boolean isEnabled()

public HiveMetastoreFactory createCachingHiveMetastoreFactory(HiveMetastoreFactory metastoreFactory)
{
if (!enabled) {
if (!enabled || metastoreFactory.hasBuiltInCaching()) {
return metastoreFactory;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ public GlueHiveMetastoreFactory(GlueHiveMetastore metastore, Tracer tracer)
this.metastore = new TracingHiveMetastore(tracer, metastore);
}

@Override
public boolean hasBuiltInCaching()
{
return true;
}

@Override
public boolean isImpersonationEnabled()
{
Expand Down

0 comments on commit 68e0fa8

Please sign in to comment.