You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "ctrezzo (via GitHub)" <gi...@apache.org> on 2024/03/01 23:50:54 UTC

Re: [PR] HDFS-17404. Add Namenode info to log message when setting block keys [hadoop]

ctrezzo commented on code in PR #6598:
URL: https://github.com/apache/hadoop/pull/6598#discussion_r1509687361


##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/security/token/block/BlockTokenSecretManager.java:
##########
@@ -221,12 +225,16 @@ private synchronized void removeExpiredKeys() {
   /**
    * Set block keys, only to be used in worker mode
    */
-  public synchronized void addKeys(ExportedBlockKeys exportedKeys)
+  public synchronized void addKeys(ExportedBlockKeys exportedKeys, Optional<InetSocketAddress> nnAddr)
       throws IOException {
     if (isMaster || exportedKeys == null) {
       return;
     }
-    LOG.info("Setting block keys. BlockPool = {} .", blockPoolId);
+    if (nnAddr.isPresent()) {
+      LOG.info("Setting block keys. BlockPool = {} . Namenode Address = {} .", blockPoolId, nnAddr);

Review Comment:
   Can we pass the BPServiceActor instead? That way you can print the hostname as well as the state. This will display whether or not it was the active/standby/observer when the request happened. This could be useful debugging information.



##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/security/token/block/BlockPoolTokenSecretManager.java:
##########
@@ -36,7 +38,7 @@
  */
 public class BlockPoolTokenSecretManager extends
     SecretManager<BlockTokenIdentifier> {
-  

Review Comment:
   Can you go through all the files and remove the changes that do not pertain to the lines modified by this patch?



-- 
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-unsubscribe@hadoop.apache.org

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


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