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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]