hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From templ...@apache.org
Subject hadoop git commit: YARN-6103. Log updates for ZKRMStateStore (Contributed by Daniel Sturman via Daniel Templeton)
Date Tue, 31 Jan 2017 05:46:24 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 11e44bdda -> 87852b6ef


YARN-6103. Log updates for ZKRMStateStore (Contributed by Daniel Sturman via Daniel Templeton)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/87852b6e
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/87852b6e
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/87852b6e

Branch: refs/heads/trunk
Commit: 87852b6ef4b9d973b7b3999974d41c8860fb1495
Parents: 11e44bd
Author: Daniel Templeton <templedf@apache.org>
Authored: Mon Jan 30 21:44:48 2017 -0800
Committer: Daniel Templeton <templedf@apache.org>
Committed: Mon Jan 30 21:44:48 2017 -0800

----------------------------------------------------------------------
 .../recovery/ZKRMStateStore.java                | 27 ++++++++++++--------
 1 file changed, 16 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/87852b6e/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/ZKRMStateStore.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/ZKRMStateStore.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/ZKRMStateStore.java
index cf6380f..1212a91 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/ZKRMStateStore.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/ZKRMStateStore.java
@@ -610,8 +610,10 @@ public class ZKRMStateStore extends RMStateStore {
     } else {
       safeCreate(nodeUpdatePath, appStateData, zkAcl,
           CreateMode.PERSISTENT);
-      LOG.debug(appId + " znode didn't exist. Created a new znode to"
-          + " update the application state.");
+      if (LOG.isDebugEnabled()) {
+        LOG.debug(appId + " znode didn't exist. Created a new znode to"
+            + " update the application state.");
+      }
     }
   }
 
@@ -655,8 +657,10 @@ public class ZKRMStateStore extends RMStateStore {
     } else {
       safeCreate(nodeUpdatePath, attemptStateData, zkAcl,
           CreateMode.PERSISTENT);
-      LOG.debug(appAttemptId + " znode didn't exist. Created a new znode to"
-          + " update the application attempt state.");
+      if (LOG.isDebugEnabled()) {
+        LOG.debug(appAttemptId + " znode didn't exist. Created a new znode to"
+            + " update the application attempt state.");
+      }
     }
   }
 
@@ -736,7 +740,9 @@ public class ZKRMStateStore extends RMStateStore {
     } else {
       // in case znode doesn't exist
       addStoreOrUpdateOps(trx, rmDTIdentifier, renewDate, false);
-      LOG.debug("Attempted to update a non-existing znode " + nodeRemovePath);
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("Attempted to update a non-existing znode " + nodeRemovePath);
+      }
     }
 
     trx.commit();
@@ -753,12 +759,12 @@ public class ZKRMStateStore extends RMStateStore {
     ByteArrayOutputStream seqOs = new ByteArrayOutputStream();
 
     try (DataOutputStream seqOut = new DataOutputStream(seqOs)) {
-      if (LOG.isDebugEnabled()) {
-        LOG.debug((isUpdate ? "Storing " : "Updating ") + "RMDelegationToken_"
-            + rmDTIdentifier.getSequenceNumber());
-      }
 
       if (isUpdate) {
+        if (LOG.isDebugEnabled()) {
+          LOG.debug("Updating RMDelegationToken_"
+              + rmDTIdentifier.getSequenceNumber());
+        }
         trx.setData(nodeCreatePath, identifierData.toByteArray(), -1);
       } else {
         trx.create(nodeCreatePath, identifierData.toByteArray(), zkAcl,
@@ -767,8 +773,7 @@ public class ZKRMStateStore extends RMStateStore {
         seqOut.writeInt(rmDTIdentifier.getSequenceNumber());
 
         if (LOG.isDebugEnabled()) {
-          LOG.debug((isUpdate ? "Storing " : "Updating ")
-              + dtSequenceNumberPath + ". SequenceNumber: "
+          LOG.debug("Storing " + dtSequenceNumberPath + ". SequenceNumber: "
               + rmDTIdentifier.getSequenceNumber());
         }
 


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


Mime
View raw message