Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,13 @@ public class DynamoDbCatalog extends BaseMetastoreCatalog
private AwsProperties awsProperties;
private FileIO fileIO;
private CloseableGroup closeableGroup;
private Map<String, String> catalogProperties;

public DynamoDbCatalog() {}

@Override
public void initialize(String name, Map<String, String> properties) {
this.catalogProperties = ImmutableMap.copyOf(properties);
initialize(
name,
properties.get(CatalogProperties.WAREHOUSE_LOCATION),
Expand Down Expand Up @@ -686,4 +688,9 @@ private boolean updateProperties(
return false;
}
}

@Override
protected Map<String, String> properties() {
return catalogProperties == null ? ImmutableMap.of() : catalogProperties;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is how it's being already done in the HadoopCatalog / HiveCatalog

}
}
5 changes: 5 additions & 0 deletions core/src/main/java/org/apache/iceberg/jdbc/JdbcCatalog.java
Original file line number Diff line number Diff line change
Expand Up @@ -588,4 +588,9 @@ private boolean deleteProperties(Namespace namespace, Set<String> properties) {

return execute(JdbcUtil.deletePropertiesStatement(properties), args) > 0;
}

@Override
protected Map<String, String> properties() {
return catalogProperties == null ? ImmutableMap.of() : catalogProperties;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
import org.apache.iceberg.io.CloseableGroup;
import org.apache.iceberg.io.FileIO;
import org.apache.iceberg.relocated.com.google.common.base.Preconditions;
import org.apache.iceberg.relocated.com.google.common.collect.ImmutableMap;
import org.apache.iceberg.relocated.com.google.common.collect.Lists;
import org.apache.iceberg.relocated.com.google.common.io.ByteStreams;
import org.apache.iceberg.util.LocationUtil;
Expand Down Expand Up @@ -84,6 +85,7 @@ public class EcsCatalog extends BaseMetastoreCatalog

private FileIO fileIO;
private CloseableGroup closeableGroup;
private Map<String, String> catalogProperties;

/**
* No-arg constructor to load the catalog dynamically.
Expand All @@ -94,6 +96,7 @@ public EcsCatalog() {}

@Override
public void initialize(String name, Map<String, String> properties) {
this.catalogProperties = ImmutableMap.copyOf(properties);
String inputWarehouseLocation = properties.get(CatalogProperties.WAREHOUSE_LOCATION);
Preconditions.checkArgument(
inputWarehouseLocation != null && inputWarehouseLocation.length() > 0,
Expand Down Expand Up @@ -495,4 +498,9 @@ public void close() throws IOException {
public void setConf(Object conf) {
this.hadoopConf = conf;
}

@Override
protected Map<String, String> properties() {
return catalogProperties == null ? ImmutableMap.of() : catalogProperties;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -331,4 +331,9 @@ private TableIdentifier identifierWithoutTableReference(
}
return identifier;
}

@Override
protected Map<String, String> properties() {
return catalogOptions == null ? ImmutableMap.of() : catalogOptions;
}
}