DRILL-3893: Change Hive metadata cache invalidation policy to "1 min after last write".
Project: http://git-wip-us.apache.org/repos/asf/drill/repo Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/7de34293 Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/7de34293 Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/7de34293 Branch: refs/heads/master Commit: 7de34293d44cb9ef40d7771f82de588fd7c33bc2 Parents: bca72ab Author: vkorukanti <[email protected]> Authored: Tue Oct 20 16:21:09 2015 -0700 Committer: vkorukanti <[email protected]> Committed: Tue Dec 1 10:37:16 2015 -0800 ---------------------------------------------------------------------- .../apache/drill/exec/store/hive/DrillHiveMetaStoreClient.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/drill/blob/7de34293/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/DrillHiveMetaStoreClient.java ---------------------------------------------------------------------- diff --git a/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/DrillHiveMetaStoreClient.java b/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/DrillHiveMetaStoreClient.java index aa1d074..3667c8f 100644 --- a/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/DrillHiveMetaStoreClient.java +++ b/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/DrillHiveMetaStoreClient.java @@ -307,12 +307,12 @@ public abstract class DrillHiveMetaStoreClient extends HiveMetaStoreClient { databases = CacheBuilder // .newBuilder() // - .expireAfterAccess(1, TimeUnit.MINUTES) // + .expireAfterWrite(1, TimeUnit.MINUTES) // .build(new DatabaseLoader()); tableNameLoader = CacheBuilder // .newBuilder() // - .expireAfterAccess(1, TimeUnit.MINUTES) // + .expireAfterWrite(1, TimeUnit.MINUTES) // .build(new TableNameLoader()); tableLoaders = CacheBuilder // @@ -387,7 +387,7 @@ public abstract class DrillHiveMetaStoreClient extends HiveMetaStoreClient { public LoadingCache<String, HiveReadEntry> load(String key) throws Exception { return CacheBuilder .newBuilder() - .expireAfterAccess(1, TimeUnit.MINUTES) + .expireAfterWrite(1, TimeUnit.MINUTES) .build(new TableLoader(key)); } }
