Revert "HDFS-16033 Fix issue of the StatisticsDataReferenceCleaner cleanUp (#3042)"
This reverts commit 4a26a61ecd
.
This commit is contained in:
parent
4ef27a596f
commit
6e5692e7e2
@ -4004,19 +4004,12 @@ public void cleanUp() {
|
|||||||
* Background action to act on references being removed.
|
* Background action to act on references being removed.
|
||||||
*/
|
*/
|
||||||
private static class StatisticsDataReferenceCleaner implements Runnable {
|
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
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
while (!Thread.interrupted()) {
|
while (!Thread.interrupted()) {
|
||||||
try {
|
try {
|
||||||
StatisticsDataReference ref =
|
StatisticsDataReference ref =
|
||||||
(StatisticsDataReference)STATS_DATA_REF_QUEUE.
|
(StatisticsDataReference)STATS_DATA_REF_QUEUE.remove();
|
||||||
remove(REF_QUEUE_POLL_TIMEOUT);
|
|
||||||
ref.cleanUp();
|
ref.cleanUp();
|
||||||
} catch (InterruptedException ie) {
|
} catch (InterruptedException ie) {
|
||||||
LOGGER.warn("Cleaner thread interrupted, will stop", ie);
|
LOGGER.warn("Cleaner thread interrupted, will stop", ie);
|
||||||
|
Loading…
Reference in New Issue
Block a user