@InterfaceAudience.Private public class DirScanPool extends Object implements ConfigurationObserver
Modifier and Type | Class and Description |
---|---|
private static class |
DirScanPool.Type |
Modifier and Type | Field and Description |
---|---|
private int |
cleanerLatch |
private DirScanPool.Type |
dirScanPoolType |
private static org.slf4j.Logger |
LOG |
private String |
name |
private ThreadPoolExecutor |
pool |
private boolean |
reconfigNotification |
private int |
size |
Modifier | Constructor and Description |
---|---|
private |
DirScanPool(org.apache.hadoop.conf.Configuration conf,
DirScanPool.Type dirScanPoolType) |
private |
DirScanPool(DirScanPool.Type dirScanPoolType,
String poolSize) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
execute(Runnable runnable) |
static DirScanPool |
getHFileCleanerScanPool(org.apache.hadoop.conf.Configuration conf) |
static DirScanPool |
getHFileCleanerScanPool(String poolSize) |
static DirScanPool |
getLogCleanerScanPool(org.apache.hadoop.conf.Configuration conf) |
int |
getSize() |
private static ThreadPoolExecutor |
initializePool(int size,
String name) |
(package private) void |
latchCountDown() |
(package private) void |
latchCountUp() |
void |
onConfigurationChange(org.apache.hadoop.conf.Configuration conf)
Checks if pool can be updated.
|
void |
shutdownNow() |
(package private) void |
tryUpdatePoolSize(long timeout) |
private static final org.slf4j.Logger LOG
private volatile int size
private final ThreadPoolExecutor pool
private int cleanerLatch
private boolean reconfigNotification
private DirScanPool.Type dirScanPoolType
private DirScanPool(org.apache.hadoop.conf.Configuration conf, DirScanPool.Type dirScanPoolType)
private DirScanPool(DirScanPool.Type dirScanPoolType, String poolSize)
private static ThreadPoolExecutor initializePool(int size, String name)
public void onConfigurationChange(org.apache.hadoop.conf.Configuration conf)
onConfigurationChange
in interface ConfigurationObserver
conf
- configurationvoid latchCountUp()
void latchCountDown()
public void shutdownNow()
void tryUpdatePoolSize(long timeout)
public int getSize()
public static DirScanPool getHFileCleanerScanPool(org.apache.hadoop.conf.Configuration conf)
public static DirScanPool getHFileCleanerScanPool(String poolSize)
public static DirScanPool getLogCleanerScanPool(org.apache.hadoop.conf.Configuration conf)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.