Revert "HDFS-16033 Fix issue of the StatisticsDataReferenceCleaner cleanUp (#3042)"

This reverts commit 20a4cb0c67.
This commit is contained in:
Mingliang Liu 2021-06-11 00:38:36 -07:00
parent e62cdf915f
commit d92af85045
No known key found for this signature in database
GPG Key ID: BC2FB8C6908A0C16
1 changed files with 1 additions and 8 deletions

View File

@ -3831,19 +3831,12 @@ public abstract class FileSystem extends Configured
* 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);