Skip to content

Commit 44f2261

Browse files
authored
update hadoop prefix (#35257)
1 parent cbdf30b commit 44f2261

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/iceberg/IcebergTableProvider.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,17 @@
2626
import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableMap;
2727

2828
public class IcebergTableProvider extends InMemoryMetaTableProvider {
29-
private static final String BEAM_HADOOP_PREFIX = "beam.catalog.%s.hadoop";
29+
// TODO(ahmedabu98): extend this to the IO implementation so
30+
// other SDKs can make use of it too
31+
private static final String BEAM_HADOOP_PREFIX = "beam.catalog.hadoop";
3032
@VisibleForTesting final IcebergCatalogConfig catalogConfig;
3133

3234
public IcebergTableProvider(String name, Map<String, String> properties) {
3335
ImmutableMap.Builder<String, String> catalogProps = ImmutableMap.builder();
3436
ImmutableMap.Builder<String, String> hadoopProps = ImmutableMap.builder();
35-
String hadoopPrefix = String.format(BEAM_HADOOP_PREFIX, name);
3637

3738
for (Map.Entry<String, String> entry : properties.entrySet()) {
38-
if (entry.getKey().startsWith(hadoopPrefix)) {
39+
if (entry.getKey().startsWith(BEAM_HADOOP_PREFIX)) {
3940
hadoopProps.put(entry.getKey(), entry.getValue());
4041
} else {
4142
catalogProps.put(entry.getKey(), entry.getValue());

0 commit comments

Comments
 (0)