From 9cf321f684ce8b5ab8f15fb8b9e64a0886965bb4 Mon Sep 17 00:00:00 2001 From: SHEKHAR PRASAD RAJAK Date: Tue, 5 Nov 2024 23:37:02 +0530 Subject: [PATCH] checkstyle fixes --- .../druid/iceberg/common/IcebergDruidModule.java | 2 +- .../druid/iceberg/input/GlueIcebergCatalog.java | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/extensions-contrib/druid-iceberg-extensions/src/main/java/org/apache/druid/iceberg/common/IcebergDruidModule.java b/extensions-contrib/druid-iceberg-extensions/src/main/java/org/apache/druid/iceberg/common/IcebergDruidModule.java index 488a8393a5f6..d238cccc248c 100644 --- a/extensions-contrib/druid-iceberg-extensions/src/main/java/org/apache/druid/iceberg/common/IcebergDruidModule.java +++ b/extensions-contrib/druid-iceberg-extensions/src/main/java/org/apache/druid/iceberg/common/IcebergDruidModule.java @@ -25,11 +25,11 @@ import com.google.inject.Binder; import org.apache.druid.error.DruidException; import org.apache.druid.iceberg.guice.HiveConf; +import org.apache.druid.iceberg.input.GlueIcebergCatalog; import org.apache.druid.iceberg.input.HiveIcebergCatalog; import org.apache.druid.iceberg.input.IcebergInputSource; import org.apache.druid.iceberg.input.LocalCatalog; import org.apache.druid.iceberg.input.RestIcebergCatalog; -import org.apache.druid.iceberg.input.GlueIcebergCatalog; import org.apache.druid.initialization.DruidModule; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; diff --git a/extensions-contrib/druid-iceberg-extensions/src/main/java/org/apache/druid/iceberg/input/GlueIcebergCatalog.java b/extensions-contrib/druid-iceberg-extensions/src/main/java/org/apache/druid/iceberg/input/GlueIcebergCatalog.java index c8bdee1c22f0..8a614b098618 100644 --- a/extensions-contrib/druid-iceberg-extensions/src/main/java/org/apache/druid/iceberg/input/GlueIcebergCatalog.java +++ b/extensions-contrib/druid-iceberg-extensions/src/main/java/org/apache/druid/iceberg/input/GlueIcebergCatalog.java @@ -36,7 +36,8 @@ * It expects Catalog Properties key:value pair, which is iceberg compatible: * https://iceberg.apache.org/docs/latest/configuration/#catalog-properties */ -public class GlueIcebergCatalog extends IcebergCatalog { +public class GlueIcebergCatalog extends IcebergCatalog +{ private static final String CATALOG_NAME = "glue"; private Catalog catalog; @@ -67,7 +68,8 @@ public GlueIcebergCatalog( @JsonProperty("catalogProperties") @Nullable Map catalogProperties, @JsonProperty("caseSensitive") Boolean caseSensitive, @JacksonInject @Json ObjectMapper mapper - ) { + ) + { this.catalogProperties = DynamicConfigProviderUtils.extraConfigAndSetStringMap( catalogProperties, DRUID_DYNAMIC_CONFIG_PROVIDER_KEY, @@ -78,7 +80,8 @@ public GlueIcebergCatalog( } @Override - public Catalog retrieveCatalog() { + public Catalog retrieveCatalog() + { if (catalog == null) { log.info("catalog is null, setting up default glue catalog."); catalog = setupGlueCatalog(); @@ -87,7 +90,8 @@ public Catalog retrieveCatalog() { return catalog; } - private Catalog setupGlueCatalog() { + private Catalog setupGlueCatalog() + { // We are not passing any hadoop config, third parameter is null catalogProperties.put("type", TYPE_KEY); catalog = CatalogUtil.buildIcebergCatalog(CATALOG_NAME, catalogProperties, null); @@ -95,7 +99,8 @@ private Catalog setupGlueCatalog() { } @Override - public boolean isCaseSensitive() { + public boolean isCaseSensitive() + { return caseSensitive; } }