From d46eec3baa4b95ccde18983dcb51bdca7d70338a Mon Sep 17 00:00:00 2001 From: Andrew Hall Date: Mon, 22 Apr 2024 16:51:07 -0700 Subject: [PATCH] Log message if file system caching is disabled on coordinator Co-authored-by: Yuya Ebihara --- lib/trino-filesystem-cache-alluxio/pom.xml | 5 +++++ .../alluxio/AlluxioCoordinatorFileSystemCache.java | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/lib/trino-filesystem-cache-alluxio/pom.xml b/lib/trino-filesystem-cache-alluxio/pom.xml index e2d8093bd84f..dbcb8f1ed4e2 100644 --- a/lib/trino-filesystem-cache-alluxio/pom.xml +++ b/lib/trino-filesystem-cache-alluxio/pom.xml @@ -44,6 +44,11 @@ configuration + + io.airlift + log + + io.airlift stats diff --git a/lib/trino-filesystem-cache-alluxio/src/main/java/io/trino/filesystem/alluxio/AlluxioCoordinatorFileSystemCache.java b/lib/trino-filesystem-cache-alluxio/src/main/java/io/trino/filesystem/alluxio/AlluxioCoordinatorFileSystemCache.java index 427c9659167b..739e0702b519 100644 --- a/lib/trino-filesystem-cache-alluxio/src/main/java/io/trino/filesystem/alluxio/AlluxioCoordinatorFileSystemCache.java +++ b/lib/trino-filesystem-cache-alluxio/src/main/java/io/trino/filesystem/alluxio/AlluxioCoordinatorFileSystemCache.java @@ -17,6 +17,7 @@ import alluxio.conf.AlluxioProperties; import alluxio.conf.InstancedConfiguration; import com.google.inject.Inject; +import io.airlift.log.Logger; import io.opentelemetry.api.trace.Tracer; import io.trino.filesystem.Location; import io.trino.filesystem.TrinoInput; @@ -35,6 +36,8 @@ public class AlluxioCoordinatorFileSystemCache implements TrinoFileSystemCache { + private static final Logger log = Logger.get(AlluxioCoordinatorFileSystemCache.class); + private final Optional alluxioFileSystemCache; @Inject @@ -49,6 +52,7 @@ public AlluxioCoordinatorFileSystemCache( alluxioFileSystemCache = Optional.of(new AlluxioFileSystemCache(tracer, config, statistics)); } else { + log.debug("File system cache is disabled on a coordinator"); alluxioFileSystemCache = Optional.empty(); try { CacheManager cacheManager = CacheManager.Factory.create(new InstancedConfiguration(new AlluxioProperties()));