From 549903ec49eec9f69b7bcbc9b937faec42fa029f Mon Sep 17 00:00:00 2001 From: Marius Grama Date: Mon, 13 Apr 2026 20:41:33 +0200 Subject: [PATCH] Remove "native" prefix from FileSystemConfig fields and methods --- .../filesystem/manager/FileSystemConfig.java | 44 +++++++++---------- .../filesystem/manager/FileSystemModule.java | 8 ++-- .../manager/TestFileSystemConfig.java | 16 +++---- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/lib/trino-filesystem-manager/src/main/java/io/trino/filesystem/manager/FileSystemConfig.java b/lib/trino-filesystem-manager/src/main/java/io/trino/filesystem/manager/FileSystemConfig.java index 0d5c8addff82..a243fd90965a 100644 --- a/lib/trino-filesystem-manager/src/main/java/io/trino/filesystem/manager/FileSystemConfig.java +++ b/lib/trino-filesystem-manager/src/main/java/io/trino/filesystem/manager/FileSystemConfig.java @@ -23,10 +23,10 @@ public class FileSystemConfig { private boolean hadoopEnabled; private boolean alluxioEnabled; - private boolean nativeAzureEnabled; - private boolean nativeS3Enabled; - private boolean nativeGcsEnabled; - private boolean nativeLocalEnabled; + private boolean azureEnabled; + private boolean s3Enabled; + private boolean gcsEnabled; + private boolean localEnabled; private boolean cacheEnabled; // Enable leak detection if configured or if running in a CI environment @@ -50,61 +50,61 @@ public boolean isAlluxioEnabled() } @Config("fs.alluxio.enabled") - public FileSystemConfig setAlluxioEnabled(boolean nativeAlluxioEnabled) + public FileSystemConfig setAlluxioEnabled(boolean alluxioEnabled) { - this.alluxioEnabled = nativeAlluxioEnabled; + this.alluxioEnabled = alluxioEnabled; return this; } - public boolean isNativeAzureEnabled() + public boolean isAzureEnabled() { - return nativeAzureEnabled; + return azureEnabled; } @LegacyConfig("fs.native-azure.enabled") @Config("fs.azure.enabled") - public FileSystemConfig setNativeAzureEnabled(boolean nativeAzureEnabled) + public FileSystemConfig setAzureEnabled(boolean azureEnabled) { - this.nativeAzureEnabled = nativeAzureEnabled; + this.azureEnabled = azureEnabled; return this; } - public boolean isNativeS3Enabled() + public boolean isS3Enabled() { - return nativeS3Enabled; + return s3Enabled; } @LegacyConfig("fs.native-s3.enabled") @Config("fs.s3.enabled") - public FileSystemConfig setNativeS3Enabled(boolean nativeS3Enabled) + public FileSystemConfig setS3Enabled(boolean s3Enabled) { - this.nativeS3Enabled = nativeS3Enabled; + this.s3Enabled = s3Enabled; return this; } - public boolean isNativeGcsEnabled() + public boolean isGcsEnabled() { - return nativeGcsEnabled; + return gcsEnabled; } @LegacyConfig("fs.native-gcs.enabled") @Config("fs.gcs.enabled") - public FileSystemConfig setNativeGcsEnabled(boolean nativeGcsEnabled) + public FileSystemConfig setGcsEnabled(boolean gcsEnabled) { - this.nativeGcsEnabled = nativeGcsEnabled; + this.gcsEnabled = gcsEnabled; return this; } - public boolean isNativeLocalEnabled() + public boolean isLocalEnabled() { - return nativeLocalEnabled; + return localEnabled; } @LegacyConfig("fs.native-local.enabled") @Config("fs.local.enabled") - public FileSystemConfig setNativeLocalEnabled(boolean nativeLocalEnabled) + public FileSystemConfig setLocalEnabled(boolean localEnabled) { - this.nativeLocalEnabled = nativeLocalEnabled; + this.localEnabled = localEnabled; return this; } diff --git a/lib/trino-filesystem-manager/src/main/java/io/trino/filesystem/manager/FileSystemModule.java b/lib/trino-filesystem-manager/src/main/java/io/trino/filesystem/manager/FileSystemModule.java index 7ff36f3ddd9b..8183e434f61c 100644 --- a/lib/trino-filesystem-manager/src/main/java/io/trino/filesystem/manager/FileSystemModule.java +++ b/lib/trino-filesystem-manager/src/main/java/io/trino/filesystem/manager/FileSystemModule.java @@ -95,7 +95,7 @@ protected void setup(Binder binder) factories.addBinding("alluxio").to(AlluxioFileSystemFactory.class); } - if (config.isNativeAzureEnabled()) { + if (config.isAzureEnabled()) { install(new AzureFileSystemModule()); factories.addBinding("abfs").to(AzureFileSystemFactory.class); factories.addBinding("abfss").to(AzureFileSystemFactory.class); @@ -103,19 +103,19 @@ protected void setup(Binder binder) factories.addBinding("wasbs").to(AzureFileSystemFactory.class); } - if (config.isNativeS3Enabled()) { + if (config.isS3Enabled()) { install(new S3FileSystemModule()); factories.addBinding("s3").to(Key.get(TrinoFileSystemFactory.class, FileSystemS3.class)); factories.addBinding("s3a").to(Key.get(TrinoFileSystemFactory.class, FileSystemS3.class)); factories.addBinding("s3n").to(Key.get(TrinoFileSystemFactory.class, FileSystemS3.class)); } - if (config.isNativeGcsEnabled()) { + if (config.isGcsEnabled()) { install(new GcsFileSystemModule()); factories.addBinding("gs").to(GcsFileSystemFactory.class); } - if (config.isNativeLocalEnabled()) { + if (config.isLocalEnabled()) { configBinder(binder).bindConfig(LocalFileSystemConfig.class); factories.addBinding("local").to(LocalFileSystemFactory.class); factories.addBinding("file").to(LocalFileSystemFactory.class); diff --git a/lib/trino-filesystem-manager/src/test/java/io/trino/filesystem/manager/TestFileSystemConfig.java b/lib/trino-filesystem-manager/src/test/java/io/trino/filesystem/manager/TestFileSystemConfig.java index 2f5ffa24b166..1f84bbe2ad8b 100644 --- a/lib/trino-filesystem-manager/src/test/java/io/trino/filesystem/manager/TestFileSystemConfig.java +++ b/lib/trino-filesystem-manager/src/test/java/io/trino/filesystem/manager/TestFileSystemConfig.java @@ -34,10 +34,10 @@ public void testDefaults() assertRecordedDefaults(recordDefaults(FileSystemConfig.class) .setHadoopEnabled(false) .setAlluxioEnabled(false) - .setNativeAzureEnabled(false) - .setNativeS3Enabled(false) - .setNativeGcsEnabled(false) - .setNativeLocalEnabled(false) + .setAzureEnabled(false) + .setS3Enabled(false) + .setGcsEnabled(false) + .setLocalEnabled(false) .setCacheEnabled(false) .setTrackingEnabled(RUNNING_IN_CI)); } @@ -59,10 +59,10 @@ public void testExplicitPropertyMappings() FileSystemConfig expected = new FileSystemConfig() .setHadoopEnabled(true) .setAlluxioEnabled(true) - .setNativeAzureEnabled(true) - .setNativeS3Enabled(true) - .setNativeGcsEnabled(true) - .setNativeLocalEnabled(true) + .setAzureEnabled(true) + .setS3Enabled(true) + .setGcsEnabled(true) + .setLocalEnabled(true) .setCacheEnabled(true) .setTrackingEnabled(!RUNNING_IN_CI);