@InterfaceAudience.Private public class ExcludeDatanodeManager extends Object implements ConfigurationObserver
Modifier and Type | Field and Description |
---|---|
private org.apache.hadoop.conf.Configuration |
conf |
static int |
DEFAULT_WAL_EXCLUDE_DATANODE_TTL |
static int |
DEFAULT_WAL_MAX_EXCLUDE_SLOW_DATANODE_COUNT |
private org.apache.hbase.thirdparty.com.google.common.cache.Cache<org.apache.hadoop.hdfs.protocol.DatanodeInfo,Long> |
excludeDNsCache |
private static org.slf4j.Logger |
LOG |
private int |
maxExcludeDNCount |
private Map<String,StreamSlowMonitor> |
streamSlowMonitors |
static String |
WAL_EXCLUDE_DATANODE_TTL_KEY
Configure for the TTL time of the datanodes excluded
|
static String |
WAL_MAX_EXCLUDE_SLOW_DATANODE_COUNT_KEY
Configure for the max count the excluded datanodes.
|
Constructor and Description |
---|
ExcludeDatanodeManager(org.apache.hadoop.conf.Configuration conf) |
Modifier and Type | Method and Description |
---|---|
Map<org.apache.hadoop.hdfs.protocol.DatanodeInfo,Long> |
getExcludeDNs() |
StreamSlowMonitor |
getStreamSlowMonitor(String name) |
void |
onConfigurationChange(org.apache.hadoop.conf.Configuration conf)
This method would be called by the
ConfigurationManager object when the
Configuration object is reloaded from disk. |
boolean |
tryAddExcludeDN(org.apache.hadoop.hdfs.protocol.DatanodeInfo datanodeInfo,
String cause)
Try to add a datanode to the regionserver excluding cache
|
private static final org.slf4j.Logger LOG
public static final String WAL_MAX_EXCLUDE_SLOW_DATANODE_COUNT_KEY
public static final int DEFAULT_WAL_MAX_EXCLUDE_SLOW_DATANODE_COUNT
public static final String WAL_EXCLUDE_DATANODE_TTL_KEY
public static final int DEFAULT_WAL_EXCLUDE_DATANODE_TTL
private volatile org.apache.hbase.thirdparty.com.google.common.cache.Cache<org.apache.hadoop.hdfs.protocol.DatanodeInfo,Long> excludeDNsCache
private final int maxExcludeDNCount
private final org.apache.hadoop.conf.Configuration conf
private final Map<String,StreamSlowMonitor> streamSlowMonitors
public ExcludeDatanodeManager(org.apache.hadoop.conf.Configuration conf)
public boolean tryAddExcludeDN(org.apache.hadoop.hdfs.protocol.DatanodeInfo datanodeInfo, String cause)
datanodeInfo
- the datanode to be added to the excluded cachecause
- the cause that the datanode is hope to be excludedpublic StreamSlowMonitor getStreamSlowMonitor(String name)
public Map<org.apache.hadoop.hdfs.protocol.DatanodeInfo,Long> getExcludeDNs()
public void onConfigurationChange(org.apache.hadoop.conf.Configuration conf)
ConfigurationObserver
ConfigurationManager
object when the
Configuration
object is reloaded from disk.onConfigurationChange
in interface ConfigurationObserver
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.