Skip to content

Conversation

@SEZ9
Copy link
Contributor

@SEZ9 SEZ9 commented Aug 3, 2025

Purpose of this pull request

Does this PR introduce any user-facing change?

How was this patch tested?

Check list

Copy link
Contributor

@davidzollo davidzollo left a comment

Choose a reason for hiding this comment

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

Good job.
Please add related E2E test case. thx

.atZone(ZoneId.systemDefault())
.withZoneSameInstant(ZoneOffset.UTC)
.toOffsetDateTime();
return ((LocalDateTime) value).atOffset(ZoneOffset.UTC);
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not right,
// In Beijing (UTC+8), developer writes:
LocalDateTime meeting = LocalDateTime.of(2024, 1, 1, 14, 0, 0); // 2 PM local

// Original code: Correctly converts to 6 AM UTC
// Modified code: Treats as 2 PM UTC (8 hours off!)

Comment on lines +91 to +116
// REST Catalog Configuration
public static final Option<String> REST_URI =
Options.key("rest.uri")
.stringType()
.noDefaultValue()
.withDescription("The URI for the REST catalog endpoint");

public static final Option<String> REST_WAREHOUSE =
Options.key("rest.warehouse")
.stringType()
.noDefaultValue()
.withDescription("The warehouse location for the REST catalog");

public static final Option<String> REST_AUTH_TYPE =
Options.key("rest.auth.type")
.stringType()
.defaultValue("none")
.withDescription(
"Authentication type for REST catalog. Supported values: none, token, aws");

public static final Option<String> REST_AUTH_TOKEN =
Options.key("rest.auth.token")
.stringType()
.noDefaultValue()
.withDescription(
"Authentication token for REST catalog when auth.type is 'token'");
Copy link
Member

Choose a reason for hiding this comment

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

why not directly put all config into iceberg.catalog.config?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok

Comment on lines +127 to +152
private void setupAwsAuthentication(Map<String, String> catalogProps) {
log.info("Setting up AWS authentication for REST catalog");

// Enable SigV4 signing for AWS REST catalog
catalogProps.put("rest.sigv4-enabled", "true");
log.info("Enabled SigV4 signing");

// AWS credentials will be resolved through environment variables:
// AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN (optional)
// AWS_REGION or AWS_DEFAULT_REGION
log.info("AWS credentials will be resolved through environment variables");

// Determine signing service based on REST URI
String restUri = config.getRestUri();
if (restUri != null) {
if (restUri.contains("s3tables")) {
catalogProps.put("rest.signing-name", "s3tables");
log.info("Signing service set to: s3tables for URI: {}", restUri);
} else {
catalogProps.put("rest.signing-name", "glue");
log.info("Signing service set to: glue for URI: {}", restUri);
}
} else {
catalogProps.put("rest.signing-name", "glue");
log.warn("REST URI is null, defaulting signing service to: glue");
}
Copy link
Member

Choose a reason for hiding this comment

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

Are our existing parameters already capable of reading AWS's rest catalog? Is this PR just a parameter conversion? I prefer to just add examples to the documentation rather than add a new config key.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, currently ST's Iceberg catalog only supports Hive and Hadoop, and does not support Rest. S3 tables is only a special Rest,and need to specify parameters for compatibility.

Copy link
Member

Choose a reason for hiding this comment

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

IcebergCatalogType.java only worked for test case. So I think we support rest catalog. We have also accessed the rest catalog normally through the current version code in our environment.

Copy link
Member

Choose a reason for hiding this comment

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

This is a demo:

iceberg.catalog.config = {
type=rest
uri="http://192.168.124.199:8080/catalog/"
warehouse=demo2
"s3.endpoint"="http://192.168.124.199:9000"
"s3.access-key-id"="******"
"s3.secret-access-key"="******"
io-impl="org.apache.iceberg.aws.s3.S3FileIO"

}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

let me test

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for @Hisoka-X 's suggestion. After careful consideration and testing, i notice that there's really no need to add separate parameter support for AWS S3 Tables. I've added documentation for rest catalog integration support in another pr #9686 , so i'll close this one . Thank you.

@github-actions github-actions bot removed the iceberg label Aug 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants