@InterfaceAudience.Private public class MasterRegionServerList extends Object implements RegionServerList
MasterRegion based RegionServerList.
This is useful when we want to restart a cluster with only the data on file system, as when
restarting, we need to get the previous live region servers for scheduling SCP. Before we have
this class, we need to scan the WAL directory on WAL file system to find out the previous live
region servers, which means we can not restart a cluster without the previous WAL file system,
even if we have flushed all the data.
Please see HBASE-26245 for more details.| Modifier and Type | Field and Description |
|---|---|
private Abortable |
abortable |
private static org.slf4j.Logger |
LOG |
private MasterRegion |
region |
| Constructor and Description |
|---|
MasterRegionServerList(MasterRegion region,
Abortable abortable) |
| Modifier and Type | Method and Description |
|---|---|
void |
expired(ServerName sn)
Called when a region server is dead.
|
Set<ServerName> |
getAll()
Get all live region servers.
|
void |
started(ServerName sn)
Called when a region server join the cluster.
|
private static final org.slf4j.Logger LOG
private final MasterRegion region
public MasterRegionServerList(MasterRegion region, Abortable abortable)
public void started(ServerName sn)
RegionServerListstarted in interface RegionServerListpublic void expired(ServerName sn)
RegionServerListexpired in interface RegionServerListpublic Set<ServerName> getAll() throws IOException
RegionServerListgetAll in interface RegionServerListIOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.