Anurag-S1ngh opened a new pull request, #19278:
URL: https://github.com/apache/iceberg/pull/19278

   ## Summary
   
   - GCS supports write-time object contexts, the analogue of `s3.write.tags`, 
but Iceberg's GCS FileIO had no way to attach them.
   - Add `gcs.write.object-context.<key>=<value>` catalog properties and set 
them on the `BlobInfo` used for new objects, so the SDK sends them with the 
upload and no extra API call is needed.
   
   ## Changes
   
   - `GCPProperties`: parse properties with the `gcs.write.object-context.` 
prefix into an immutable map, reject an empty context key, and expose 
`writeObjectContexts()`.
   - `GCSOutputStream`: build the `BlobInfo` once from the configured contexts 
and pass it to the storage writer.
   - `TestGCPProperties`: cover empty, single, multiple, unrelated properties, 
and empty-key rejection.
   - `TestGCSOutputStream`: capture the `BlobInfo` and assert the configured 
contexts, and assert contexts are absent when none are configured.
   
   ## Testing
   
   - `./gradlew :iceberg-gcp:test --tests "org.apache.iceberg.gcp.*" --tests 
"org.apache.iceberg.gcp.gcs.*"` passes.
   - The object-context write test fails without the `GCSOutputStream` change.
   - `spotlessApply` run for the module.
   
   Closes #16995
   


-- 
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]

Reply via email to