Skip to content

Commit

Permalink
checkstyle fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhar-rajak committed Nov 5, 2024
1 parent 9cc2423 commit 9cf321f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -67,7 +68,8 @@ public GlueIcebergCatalog(
@JsonProperty("catalogProperties") @Nullable Map<String, Object> catalogProperties,
@JsonProperty("caseSensitive") Boolean caseSensitive,
@JacksonInject @Json ObjectMapper mapper
) {
)
{
this.catalogProperties = DynamicConfigProviderUtils.extraConfigAndSetStringMap(
catalogProperties,
DRUID_DYNAMIC_CONFIG_PROVIDER_KEY,
Expand All @@ -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();
Expand All @@ -87,15 +90,17 @@ 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);
return catalog;
}

@Override
public boolean isCaseSensitive() {
public boolean isCaseSensitive()
{
return caseSensitive;
}
}

0 comments on commit 9cf321f

Please sign in to comment.