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 GitBox <gi...@apache.org> on 2020/10/07 10:26:42 UTC

[GitHub] [hadoop] steveloughran commented on a change in pull request #2358: HADOOP-17295 Move dedicated pre-logging statements into existing logg…

steveloughran commented on a change in pull request #2358:
URL: https://github.com/apache/hadoop/pull/2358#discussion_r500899509



##########
File path: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DefaultContainerExecutor.java
##########
@@ -566,11 +566,10 @@ public void writeLocalWrapperScript(Path launchDst, Path pidFile,
   @Override
   public boolean signalContainer(ContainerSignalContext ctx)
       throws IOException {
-    String user = ctx.getUser();
     String pid = ctx.getPid();
     Signal signal = ctx.getSignal();
     LOG.debug("Sending signal {} to pid {} as user {}",

Review comment:
       unless the debug is guarded, same cost

##########
File path: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java
##########
@@ -486,12 +486,11 @@ DatanodeCommand cacheReport() throws IOException {
 
       cmd = bpNamenode.cacheReport(bpRegistration, bpid, blockIds);
       long sendTime = monotonicNow();
-      long createCost = createTime - startTime;
       long sendCost = sendTime - createTime;
       dn.getMetrics().addCacheReport(sendCost);
       if (LOG.isDebugEnabled()) {
         LOG.debug("CacheReport of " + blockIds.size()
-            + " block(s) took " + createCost + " msecs to generate and "
+            + " block(s) took " + (createTime - startTime) + " msecs to generate and "

Review comment:
       the cost of a subtraction is marginal. Moving that monotonicNow() would be more significant, as if it is using the x86 `RDSTC` call, its a barrier function which blocks all speculative execution until complete




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

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