Class ExcludeDatanodeManager
java.lang.Object
org.apache.hadoop.hbase.io.asyncfs.monitor.ExcludeDatanodeManager
- All Implemented Interfaces:
ConfigurationObserver
The class to manage the excluded datanodes of the WALs on the regionserver.
-
Field Summary
Modifier and TypeFieldDescriptionprivate final org.apache.hadoop.conf.Configuration
static final int
static final int
private org.apache.hbase.thirdparty.com.google.common.cache.Cache<org.apache.hadoop.hdfs.protocol.DatanodeInfo,
Long> private static final org.slf4j.Logger
private final int
private final Map<String,
StreamSlowMonitor> static final String
Configure for the TTL time of the datanodes excludedstatic final String
Configure for the max count the excluded datanodes. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetStreamSlowMonitor
(String name) void
onConfigurationChange
(org.apache.hadoop.conf.Configuration conf) This method would be called by theConfigurationManager
object when theConfiguration
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
-
Field Details
-
LOG
-
WAL_MAX_EXCLUDE_SLOW_DATANODE_COUNT_KEY
Configure for the max count the excluded datanodes.- See Also:
-
DEFAULT_WAL_MAX_EXCLUDE_SLOW_DATANODE_COUNT
- See Also:
-
WAL_EXCLUDE_DATANODE_TTL_KEY
Configure for the TTL time of the datanodes excluded- See Also:
-
DEFAULT_WAL_EXCLUDE_DATANODE_TTL
- See Also:
-
excludeDNsCache
private volatile org.apache.hbase.thirdparty.com.google.common.cache.Cache<org.apache.hadoop.hdfs.protocol.DatanodeInfo,Long> excludeDNsCache -
maxExcludeDNCount
-
conf
-
streamSlowMonitors
-
-
Constructor Details
-
ExcludeDatanodeManager
-
-
Method Details
-
tryAddExcludeDN
public boolean tryAddExcludeDN(org.apache.hadoop.hdfs.protocol.DatanodeInfo datanodeInfo, String cause) Try to add a datanode to the regionserver excluding cache- Parameters:
datanodeInfo
- the datanode to be added to the excluded cachecause
- the cause that the datanode is hope to be excluded- Returns:
- True if the datanode is added to the regionserver excluding cache, false otherwise
-
getStreamSlowMonitor
-
getExcludeDNs
-
onConfigurationChange
Description copied from interface:ConfigurationObserver
This method would be called by theConfigurationManager
object when theConfiguration
object is reloaded from disk.- Specified by:
onConfigurationChange
in interfaceConfigurationObserver
-