@InterfaceAudience.Private public class MasterRegistry extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
MasterRegistry.Callable<T extends com.google.protobuf.Message> |
| Modifier and Type | Field and Description |
|---|---|
protected MasterAddressRefresher |
masterAddressRefresher |
| Constructor and Description |
|---|
MasterRegistry() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Cleanup state, if any.
|
protected <T extends com.google.protobuf.Message> |
doCall(MasterRegistry.Callable<T> callable) |
ServerName |
getActiveMaster() |
String |
getClusterId() |
int |
getCurrentNrHRS() |
static String |
getMasterAddr(org.apache.hadoop.conf.Configuration conf)
Builds the default master address end point if it is not specified in the configuration.
|
RegionLocations |
getMetaRegionLocations() |
void |
init(Connection connection) |
boolean |
isTableOnlineState(TableName tableName,
boolean enabled) |
static Set<ServerName> |
parseMasterAddrs(org.apache.hadoop.conf.Configuration conf)
Parses the list of master addresses from the provided configuration.
|
protected MasterAddressRefresher masterAddressRefresher
public void init(Connection connection) throws IOException
IOExceptionprotected <T extends com.google.protobuf.Message> T doCall(MasterRegistry.Callable<T> callable) throws MasterRegistryFetchException
MasterRegistryFetchExceptionpublic ServerName getActiveMaster() throws IOException
IOExceptionpublic RegionLocations getMetaRegionLocations() throws IOException
IOExceptionpublic String getClusterId() throws IOException
IOExceptionpublic int getCurrentNrHRS()
throws IOException
IOExceptionpublic boolean isTableOnlineState(TableName tableName, boolean enabled) throws IOException
enabled - Return true if table is enabledIOExceptionpublic void close()
@InterfaceAudience.Private public static Set<ServerName> parseMasterAddrs(org.apache.hadoop.conf.Configuration conf) throws UnknownHostException
conf - Configuration to parse from.UnknownHostException@InterfaceAudience.Private public static String getMasterAddr(org.apache.hadoop.conf.Configuration conf) throws UnknownHostException
HBaseTestingUtility.UnknownHostExceptionCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.