abstractdog commented on code in PR #425:
URL: https://github.com/apache/tez/pull/425#discussion_r2315093258


##########
tez-runtime-internals/src/main/java/org/apache/tez/runtime/TezThreadDumpHelper.java:
##########
@@ -69,18 +74,20 @@ private TezThreadDumpHelper(long duration, Configuration 
conf) throws IOExceptio
       this.basePath = new Path(conf.get(NM_REMOTE_APP_LOG_DIR, 
DEFAULT_NM_REMOTE_APP_LOG_DIR));
       this.fs = this.basePath.getFileSystem(conf);
     }
-    LOG.info("Periodic Thread Dump Capture Service Configured to capture 
Thread Dumps at {} ms frequency and at " +
-        "path: {}", duration, basePath);
+    LOG.info("Periodic Thread Dump Capture Service Configured to capture 
Thread Dumps at {} ms frequency and at "
+        + "path: {} with an initial delay of {}", duration, basePath, 
initialDelay);
   }
 
   public static TezThreadDumpHelper getInstance(Configuration conf) {
     long periodicThreadDumpFrequency = 
conf.getTimeDuration(TEZ_THREAD_DUMP_INTERVAL,
         TEZ_THREAD_DUMP_INTERVAL_DEFAULT, TimeUnit.MILLISECONDS);
     Preconditions.checkArgument(periodicThreadDumpFrequency > 0, "%s must be 
positive duration",
         TEZ_THREAD_DUMP_INTERVAL);
+    long initialDelay = conf.getTimeDuration(TEZ_THREAD_DUMP_INITIAL_DELAY, 
TEZ_THREAD_DUMP_INITIAL_DELAY_DEFAULT,
+        TimeUnit.MILLISECONDS);
 
     try {
-      return new TezThreadDumpHelper(periodicThreadDumpFrequency, conf);
+      return new TezThreadDumpHelper(periodicThreadDumpFrequency, 
initialDelay, conf);

Review Comment:
   what about harmonizing the variable names from periodicThreadDumpFrequency + 
initialDelay to something like:
   ```
   threadDumpFrequency + threadDumpInitialDelay
   ```
   or even:
   ```
   frequency + initialDelay
   ```
   to reflect that these variables will configure the very-same executor
   
   also, if it's called something "frequency" at some point, let it be called 
the same in the function (instead of "duration")



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to