deepujain opened a new pull request, #8305:
URL: https://github.com/apache/hadoop/pull/8305

   ### Summary
   
   In `SignerFactory.createHttpSigner`, the HTTP signer instance was created 
via reflection but `Configuration` was never passed to it. If the signer 
implements Hadoop's `Configurable` interface, it should receive the 
configuration via `setConf(conf)` so it can use config keys (e.g. custom 
signing options). This aligns `createHttpSigner` with the existing behavior in 
`createSigner`, which already calls `setConf` when the signer is `Configurable`.
   
   ### Change
   
   - **File:** 
`hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/auth/SignerFactory.java`
   - In `createHttpSigner`: after instantiating the HTTP signer, if the 
instance is `Configurable`, call `setConf(conf)` before wrapping it in the auth 
scheme.
   - Use `getDeclaredConstructor().newInstance()` instead of deprecated 
`clazz.newInstance()`; catch `ReflectiveOperationException` for reflection 
failures.
   
   ### JIRA
   
   Fixes HADOOP-19805
   


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