comphead commented on code in PR #7680: URL: https://github.com/apache/datafusion-comet/pull/7680#discussion_r4778320931
########## docs/source/user-guide/latest/iceberg.md: ########## @@ -571,6 +571,17 @@ carries the catalog's `hadoop.*` overrides. Also gated explicitly: any `encrypti `write.object-storage.enabled=true`, and `write.location-provider.impl`. An `io-impl` table property is ignored, because iceberg-java reads `io-impl` from catalog properties only. +`client.factory` and the `client.assume-role.*` settings are admitted only together, with the +factory set to `org.apache.iceberg.aws.AssumeRoleAwsClientFactory`, both `client.assume-role.arn` and +`client.assume-role.region` set, and the data location written through `S3FileIO` itself, not a +subclass. That region becomes the write region. When `client.assume-role.session-name` is not set, +the native writer names the session `iceberg-aws-<uuid>`, as the factory does. The native writer +calls STS in the assume-role region, while the factory's STS client takes its region from the +default AWS region chain. The write falls back when the factory is combined with a different +`client.region` or `s3.region`, static S3 keys, a credential-provider class, or +`s3.allow-anonymous`, `s3.disable-ec2-metadata` or `s3.disable-config-load` set to a value the +native writer reads as true (`true`, `t`, `1` or `on`, in any case). Review Comment: The PR description reports one STS `AssumeRole` call per data file in the CloudTrail run (280 calls for 140 files) and that large writes could hit STS throttling. A throttled call fails the task, where before this PR the same configuration fell back to the JVM writer. I did not verify the call count in code. Since this PR is what moves the configuration onto the native path, please list the per-file STS cost in this paragraph so users with large writes can decide to keep the write on the JVM path. ########## docs/source/user-guide/latest/iceberg.md: ########## @@ -571,6 +571,17 @@ carries the catalog's `hadoop.*` overrides. Also gated explicitly: any `encrypti `write.object-storage.enabled=true`, and `write.location-provider.impl`. An `io-impl` table property is ignored, because iceberg-java reads `io-impl` from catalog properties only. +`client.factory` and the `client.assume-role.*` settings are admitted only together, with the +factory set to `org.apache.iceberg.aws.AssumeRoleAwsClientFactory`, both `client.assume-role.arn` and +`client.assume-role.region` set, and the data location written through `S3FileIO` itself, not a Review Comment: The eligibility table row for "Iceberg `FileIO` S3 settings" (line 555) still lists "assume-role" among the admitted settings without a condition. After this PR assume-role is admitted only under the rules in this paragraph, and `client.assume-role.*` without the factory now falls back. Please change that table cell to point here, so the table and the paragraph do not disagree. ########## spark/src/test/scala/org/apache/comet/CometIcebergWriteDetectionSuite.scala: ########## @@ -2406,6 +2515,8 @@ class DetectionDelegatingLocationProvider(delegate: LocationProvider) extends Lo } /** A real S3FileIO for data, with local metadata managed by HadoopCatalog. Planning only. */ +class DetectionS3FileIOSubclass extends S3FileIO Review Comment: `DetectionS3FileIOSubclass` was inserted between the scaladoc and the class it documents, so "A real S3FileIO for data, with local metadata managed by HadoopCatalog" now describes the subclass. Move the new class above that comment or give it its own one-line comment. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
