sumitagrawl commented on code in PR #5409:
URL: https://github.com/apache/ozone/pull/5409#discussion_r1366522959
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/util/MetricUtil.java:
##########
@@ -17,17 +17,32 @@
*/
package org.apache.hadoop.util;
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
import org.apache.hadoop.metrics2.lib.MutableRate;
import org.apache.ratis.util.function.CheckedRunnable;
import org.apache.ratis.util.function.CheckedSupplier;
import java.io.IOException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
/**
* Encloses helpers to deal with metrics.
*/
public final class MetricUtil {
+
+ private static final ExecutorService EXECUTOR =
+ new ThreadPoolExecutor(1, 10, 100, TimeUnit.MILLISECONDS,
+ new LinkedBlockingQueue<>(),
Review Comment:
provide the queue limit for this to avoid OOM
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]