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

   ### Description of PR
   
   Switch to debug level for logging `SecretManager` configured algorithm and 
key length. I really wanted to do more improvements in this class, like 
resolving the configuration in a constructor instead of static initialization 
and potentially reusing a pre-existing `Configuration` instance. I couldn't 
find a way to do that while maintaining backward-compatibility, and the class 
is annotated as public.
   
   ### How was this patch tested?
   
   On trunk, build the distro:
   
   ```
   mvn -o -Pdist -Dtar -DskipTests -DskipShade -Dmaven.javadoc.skip=true clean 
package
   ```
   
   Reproduce the bug:
   
   ```
   cnauroth@d9699e10bb20:/tmp/dist/hadoop-3.5.0-SNAPSHOT$ bin/hadoop s3guard -D 
fs.s3a.delegation.token.binding=org.apache.hadoop.fs.s3a.auth.delegation.FullCredentialsTokenBinding
 bucket-info s3a://foo
   ...
   2025-03-25 19:57:26,731 INFO token.SecretManager: Selected hash algorithm: 
HmacSHA1
   2025-03-25 19:57:26,732 INFO token.SecretManager: Selected hash key length:64
   ...
   ```
   
   Apply this patch, rebuild the distro and retest. The `SecretManager` logs 
don't appear. You can get them back by explicitly enabling debug logging:
   
   ```
   cnauroth@d9699e10bb20:/tmp/dist/hadoop-3.5.0-SNAPSHOT$ bin/hadoop --loglevel 
DEBUG s3guard -D 
fs.s3a.delegation.token.binding=org.apache.hadoop.fs.s3a.auth.delegation.FullCredentialsTokenBinding
 bucket-info s3a://foo
   ...
   2025-03-25 21:29:21,476 DEBUG token.SecretManager: Selected hash algorithm: 
HmacSHA1
   2025-03-25 21:29:21,476 DEBUG token.SecretManager: Selected hash key 
length:64
   ...
   ```
   
   ### For code changes:
   
   - [X] Does the title or this PR starts with the corresponding JIRA issue id 
(e.g. 'HADOOP-17799. Your PR title ...')?
   - [ ] Object storage: have the integration tests been executed and the 
endpoint declared according to the connector-specific documentation?
   - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, 
`NOTICE-binary` files?
   
   


-- 
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: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to