diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/CachingDirectoryLister.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/CachingDirectoryLister.java index 82df0d87b3fb..04ff66eaa0f6 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/CachingDirectoryLister.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/CachingDirectoryLister.java @@ -65,6 +65,7 @@ public CachingDirectoryLister(Duration expireAfterWrite, long maxSize, List) (key, value) -> value.files.map(List::size).orElse(1)) .expireAfterWrite(expireAfterWrite.toMillis(), TimeUnit.MILLISECONDS) + .shareNothingWhenDisabled() .recordStats() .build(); this.tablePrefixes = tables.stream() diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestBackgroundHiveSplitLoader.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestBackgroundHiveSplitLoader.java index f22b8efc8e16..f579f342a706 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestBackgroundHiveSplitLoader.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestBackgroundHiveSplitLoader.java @@ -859,7 +859,7 @@ public void testValidateFileBuckets() public void testBuildManifestFileIterator() throws Exception { - CachingDirectoryLister directoryLister = new CachingDirectoryLister(new Duration(5, TimeUnit.MINUTES), 1000, ImmutableList.of()); + CachingDirectoryLister directoryLister = new CachingDirectoryLister(new Duration(0, TimeUnit.MINUTES), 0, ImmutableList.of()); Properties schema = new Properties(); schema.setProperty(FILE_INPUT_FORMAT, SymlinkTextInputFormat.class.getName()); schema.setProperty(SERIALIZATION_LIB, AVRO.getSerde());