From d92af850456bd80f61741e41ee9bc3329cfc00cd Mon Sep 17 00:00:00 2001 From: Mingliang Liu Date: Fri, 11 Jun 2021 00:38:36 -0700 Subject: [PATCH] Revert "HDFS-16033 Fix issue of the StatisticsDataReferenceCleaner cleanUp (#3042)" This reverts commit 20a4cb0c67b413e7b9bc2b3213b5b592bfaa99d5. --- .../src/main/java/org/apache/hadoop/fs/FileSystem.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java index 458bd34267b..ff5091c776b 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java @@ -3831,19 +3831,12 @@ public void cleanUp() { * Background action to act on references being removed. */ private static class StatisticsDataReferenceCleaner implements Runnable { - /** - * Represents the timeout period expires for remove reference objects from - * the STATS_DATA_REF_QUEUE when the queue is empty. - */ - private static final int REF_QUEUE_POLL_TIMEOUT = 10000; - @Override public void run() { while (!Thread.interrupted()) { try { StatisticsDataReference ref = - (StatisticsDataReference)STATS_DATA_REF_QUEUE. - remove(REF_QUEUE_POLL_TIMEOUT); + (StatisticsDataReference)STATS_DATA_REF_QUEUE.remove(); ref.cleanUp(); } catch (InterruptedException ie) { LOGGER.warn("Cleaner thread interrupted, will stop", ie);