You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(contrib-delta) P7o: resolve S3A credential chain Scala-side for log replay
Closes the P1 credential-asymmetry gap carried from apache#3932 (commit 461fa4f).
Previously the kernel-rs log-replay path's DeltaStorageConfig only honored
explicit static keys (`fs.s3a.access.key` / `fs.s3a.secret.key` /
`fs.s3a.session.token`) set in core-site.xml. Users running under
SimpleAWSCredentialsProvider / TemporaryAWSCredentialsProvider /
AssumedRoleCredentialProvider / IAMInstanceCredentialsProvider would see
data-file reads authenticate (those go through Comet's existing native
`build_credential_provider`) but log replay fail.
Resolution happens Scala-side via reflection against
`org.apache.hadoop.fs.s3a.S3AUtils.createAWSCredentialProviderList` -- the
same Hadoop credential machinery Spark uses everywhere else. The resolved
(access_key, secret_key, session_token) tuple is stuffed into the
`storageOptions` map under the standard Hadoop keys before the JNI call.
Reflective because hadoop-aws is an optional dep; absence falls through to
static-only behavior (any user without S3 stays unaffected).
Architecture note: an in-crate cherry-pick of 461fa4f wasn't viable here
because the JNI lives in `contrib/delta/native/` -- a standalone Cargo
crate that deliberately doesn't depend on core (to keep the arrow-57 /
arrow-58 split clean). The Scala-side approach has the same correctness
properties and avoids the crate boundary entirely.
Method handles cached via @volatile Option[Option[Binding]] -- the augment
path runs on every Delta scan; resolving the Class + getMethod chain on
each call would be a per-scan reflection round-trip just to find the same
handles every time.
SNAPSHOT resolution: log replay completes in seconds, well within any
reasonable credential TTL. Long-running data reads continue to use Comet's
refresh-capable native credential provider.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments