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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumerates the reason of excluding a Datanode from WAL Write due to specific cause. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.apache.hadoop.conf.Configurationstatic final intstatic final intprivate org.apache.hbase.thirdparty.com.google.common.cache.Cache<org.apache.hadoop.hdfs.protocol.DatanodeInfo,Pair<String, Long>> private static final org.slf4j.Loggerprivate final intprivate final Map<String,StreamSlowMonitor> static final StringConfigure for the TTL time of the datanodes excludedstatic final StringConfigure for the max count the excluded datanodes. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetStreamSlowMonitor(String name) voidonConfigurationChange(org.apache.hadoop.conf.Configuration conf) This method would be called by theConfigurationManagerobject when theConfigurationobject is reloaded from disk.booleantryAddExcludeDN(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,Pair<String, excludeDNsCacheLong>> -
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:ConfigurationObserverThis method would be called by theConfigurationManagerobject when theConfigurationobject is reloaded from disk.- Specified by:
onConfigurationChangein interfaceConfigurationObserver
-