@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) |
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
IOException
protected <T extends com.google.protobuf.Message> T doCall(MasterRegistry.Callable<T> callable) throws MasterRegistryFetchException
MasterRegistryFetchException
public ServerName getActiveMaster() throws IOException
IOException
public RegionLocations getMetaRegionLocations() throws IOException
IOException
public String getClusterId() throws IOException
IOException
public int getCurrentNrHRS() throws IOException
IOException
public 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
.UnknownHostException
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.