程序包 | 说明 |
---|---|
org.apache.hadoop.hbase | |
org.apache.hadoop.hbase.client |
Provides HBase Client
Table of Contents
Overview
Example API Usage
Overview
To administer HBase, create and drop tables, list and alter tables,
use
Admin . |
org.apache.hadoop.hbase.client.backoff | |
org.apache.hadoop.hbase.exceptions | |
org.apache.hadoop.hbase.ipc | |
org.apache.hadoop.hbase.master | |
org.apache.hadoop.hbase.protobuf |
Holds classes generated from protobuf
src/main/protobuf definition files. |
org.apache.hadoop.hbase.zookeeper |
限定符和类型 | 字段和说明 |
---|---|
static List<ServerName> |
ServerName.EMPTY_SERVER_LIST |
限定符和类型 | 方法和说明 |
---|---|
ServerName |
ClusterStatus.getMaster()
Returns detailed information about the current master
ServerName . |
ServerName |
HRegionLocation.getServerName() |
ServerName |
RegionTransition.getServerName() |
static ServerName |
HRegionInfo.getServerName(Result r)
已过时。
use MetaTableAccessor methods for interacting with meta layouts
|
static ServerName |
ServerName.parseFrom(byte[] data)
Get a ServerName from the passed in data bytes.
|
static ServerName |
ServerName.parseServerName(String str) |
static ServerName |
ServerName.parseVersionedServerName(byte[] versionedBytes)
Use this method instantiating a
ServerName from bytes
gotten from a call to getVersionedBytes() . |
static ServerName |
ServerName.valueOf(String serverName)
Retrieve an instance of ServerName.
|
static ServerName |
ServerName.valueOf(String hostname,
int port,
long startcode)
Retrieve an instance of ServerName.
|
static ServerName |
ServerName.valueOf(String hostAndPort,
long startCode)
Retrieve an instance of ServerName.
|
限定符和类型 | 方法和说明 |
---|---|
Collection<ServerName> |
ClusterStatus.getBackupMasters() |
Collection<ServerName> |
ClusterStatus.getDeadServerNames() |
static Pair<HRegionInfo,ServerName> |
HRegionInfo.getHRegionInfoAndServerName(Result r)
已过时。
use MetaTableAccessor methods for interacting with meta layouts
|
Map<ServerName,ServerLoad> |
ClusterStatus.getLiveServersLoad() |
static Pair<HRegionInfo,ServerName> |
MetaTableAccessor.getRegion(Connection connection,
byte[] regionName)
已过时。
|
Collection<ServerName> |
ClusterStatus.getServerInfo()
已过时。
As of release 0.92
(HBASE-1502).
This will be removed in HBase 2.0.0.
Use
ClusterStatus.getServers() . |
Collection<ServerName> |
ClusterStatus.getServers() |
static List<Pair<HRegionInfo,ServerName>> |
MetaTableAccessor.getTableRegionsAndLocations(ZooKeeperWatcher zkw,
Connection connection,
TableName tableName) |
static List<Pair<HRegionInfo,ServerName>> |
MetaTableAccessor.getTableRegionsAndLocations(ZooKeeperWatcher zkw,
Connection connection,
TableName tableName,
boolean excludeOfflinedSplitParents) |
static List<Pair<HRegionInfo,ServerName>> |
MetaTableAccessor.getTableRegionsAndLocations(ZooKeeperWatcher zkw,
Connection connection,
TableName tableName,
boolean excludeOfflinedSplitParents,
boolean excludeReplicaRegions) |
限定符和类型 | 方法和说明 |
---|---|
static void |
MetaTableAccessor.addDaughter(Connection connection,
HRegionInfo regionInfo,
ServerName sn,
long openSeqNum)
Adds a daughter region entry to meta.
|
static Put |
MetaTableAccessor.addLocation(Put p,
ServerName sn,
long openSeqNum,
long time,
int replicaId) |
int |
ServerName.compareTo(ServerName other) |
static RegionTransition |
RegionTransition.createRegionTransition(EventType type,
byte[] regionName,
ServerName sn) |
static RegionTransition |
RegionTransition.createRegionTransition(EventType type,
byte[] regionName,
ServerName sn,
byte[] payload) |
ServerLoad |
ClusterStatus.getLoad(ServerName sn) |
static NavigableMap<HRegionInfo,Result> |
MetaTableAccessor.getServerUserRegions(Connection connection,
ServerName serverName) |
static boolean |
ServerName.isSameAddress(ServerName left,
ServerName right) |
static boolean |
ServerName.isSameHostnameAndPort(ServerName left,
ServerName right) |
static void |
MetaTableAccessor.mergeRegions(Connection connection,
HRegionInfo mergedRegion,
HRegionInfo regionA,
HRegionInfo regionB,
ServerName sn,
int regionReplication,
long masterSystemTime)
Merge the two regions into one in an atomic operation.
|
RegionLocations |
RegionLocations.removeByServer(ServerName serverName)
Returns a new RegionLocations with the locations removed (set to null)
which have the destination server as given.
|
static void |
MetaTableAccessor.splitRegion(Connection connection,
HRegionInfo parent,
HRegionInfo splitA,
HRegionInfo splitB,
ServerName sn,
int regionReplication)
Splits the region into two in an atomic operation.
|
static void |
MetaTableAccessor.updateRegionLocation(Connection connection,
HRegionInfo regionInfo,
ServerName sn,
long openSeqNum,
long masterSystemTime)
Updates the location of the specified region in hbase:meta to be the specified
server hostname and startcode.
|
构造器和说明 |
---|
ClusterStatus(String hbaseVersion,
String clusterid,
List<ServerName> deadServers,
ServerName master)
已过时。
|
ClusterStatus(String hbaseVersion,
String clusterid,
Map<ServerName,ServerLoad> servers,
Collection<ServerName> deadServers,
ServerName master,
Collection<ServerName> backupMasters,
Map<String,RegionState> rit,
String[] masterCoprocessors,
Boolean balancerOn)
已过时。
|
ClusterStatus(String hbaseVersion,
String clusterid,
Map<ServerName,ServerLoad> servers,
Collection<ServerName> deadServers,
ServerName master,
Collection<ServerName> backupMasters,
Set<RegionState> rit,
String[] masterCoprocessors,
Boolean balancerOn) |
HRegionLocation(HRegionInfo regionInfo,
ServerName serverName) |
HRegionLocation(HRegionInfo regionInfo,
ServerName serverName,
long seqNum) |
构造器和说明 |
---|
ClusterStatus(String hbaseVersion,
String clusterid,
List<ServerName> deadServers,
ServerName master)
已过时。
|
ClusterStatus(String hbaseVersion,
String clusterid,
Map<ServerName,ServerLoad> servers,
Collection<ServerName> deadServers,
ServerName master,
Collection<ServerName> backupMasters,
Map<String,RegionState> rit,
String[] masterCoprocessors,
Boolean balancerOn)
已过时。
|
ClusterStatus(String hbaseVersion,
String clusterid,
Map<ServerName,ServerLoad> servers,
Collection<ServerName> deadServers,
ServerName master,
Collection<ServerName> backupMasters,
Map<String,RegionState> rit,
String[] masterCoprocessors,
Boolean balancerOn)
已过时。
|
ClusterStatus(String hbaseVersion,
String clusterid,
Map<ServerName,ServerLoad> servers,
Collection<ServerName> deadServers,
ServerName master,
Collection<ServerName> backupMasters,
Map<String,RegionState> rit,
String[] masterCoprocessors,
Boolean balancerOn)
已过时。
|
ClusterStatus(String hbaseVersion,
String clusterid,
Map<ServerName,ServerLoad> servers,
Collection<ServerName> deadServers,
ServerName master,
Collection<ServerName> backupMasters,
Set<RegionState> rit,
String[] masterCoprocessors,
Boolean balancerOn) |
ClusterStatus(String hbaseVersion,
String clusterid,
Map<ServerName,ServerLoad> servers,
Collection<ServerName> deadServers,
ServerName master,
Collection<ServerName> backupMasters,
Set<RegionState> rit,
String[] masterCoprocessors,
Boolean balancerOn) |
ClusterStatus(String hbaseVersion,
String clusterid,
Map<ServerName,ServerLoad> servers,
Collection<ServerName> deadServers,
ServerName master,
Collection<ServerName> backupMasters,
Set<RegionState> rit,
String[] masterCoprocessors,
Boolean balancerOn) |
限定符和类型 | 字段和说明 |
---|---|
protected ConcurrentHashMap<ServerName,ConcurrentMap<byte[],MetricsConnection.RegionStats>> |
MetricsConnection.serverStats |
限定符和类型 | 方法和说明 |
---|---|
ServerName |
MasterRegistry.getActiveMaster() |
ServerName |
HBaseAdmin.getMaster() |
ServerName |
Admin.getMaster() |
限定符和类型 | 方法和说明 |
---|---|
static NavigableMap<HRegionInfo,ServerName> |
MetaScanner.allTableRegions(org.apache.hadoop.conf.Configuration conf,
Connection connection,
TableName tableName,
boolean offlined)
已过时。
|
static NavigableMap<HRegionInfo,ServerName> |
MetaScanner.allTableRegions(Connection connection,
TableName tableName)
Lists all of the table regions currently in META.
|
List<ServerName> |
HBaseAdmin.clearDeadServers(List<ServerName> servers) |
List<ServerName> |
Admin.clearDeadServers(List<ServerName> servers)
Clear dead region servers from master.
|
Map<ServerName,Boolean> |
HBaseAdmin.compactionSwitch(boolean switchState,
List<String> serverNamesList)
Turn the compaction on or off.
|
Map<ServerName,Boolean> |
Admin.compactionSwitch(boolean switchState,
List<String> serverNamesList)
Turn the compaction on or off.
|
NavigableMap<HRegionInfo,ServerName> |
HTable.getRegionLocations()
已过时。
This is no longer a public API. Use
HTable.getAllRegionLocations() instead. |
List<ServerName> |
HBaseAdmin.listDeadServers() |
List<ServerName> |
Admin.listDeadServers()
List dead region servers.
|
static Set<ServerName> |
MasterRegistry.parseMasterAddrs(org.apache.hadoop.conf.Configuration conf)
Parses the list of master addresses from the provided configuration.
|
限定符和类型 | 方法和说明 |
---|---|
void |
MetaCache.cacheLocation(TableName tableName,
ServerName source,
HRegionLocation location)
Put a newly discovered HRegionLocation into the cache.
|
void |
MetaCache.clearCache(ServerName serverName)
Delete all cached entries of a server.
|
void |
MetaCache.clearCache(TableName tableName,
byte[] row,
ServerName serverName)
Delete a cached location for a table, row and server
|
void |
ClusterConnection.clearCaches(ServerName sn)
Clear any caches that pertain to server name
sn . |
void |
HConnection.clearCaches(ServerName sn)
已过时。
internal method, do not use thru HConnection
|
void |
HBaseAdmin.closeRegion(ServerName sn,
HRegionInfo hri)
Close a region.
|
void |
Admin.closeRegion(ServerName sn,
HRegionInfo hri)
Close a region.
|
void |
HBaseAdmin.compactRegionServer(ServerName sn,
boolean major)
Compact all regions on the region server
|
void |
Admin.compactRegionServer(ServerName sn,
boolean major)
Compact all regions on the region server
|
CoprocessorRpcChannel |
HBaseAdmin.coprocessorService(ServerName sn)
Creates and returns a
RpcChannel instance
connected to the passed region server. |
CoprocessorRpcChannel |
Admin.coprocessorService(ServerName sn)
Creates and returns a
RpcChannel instance
connected to the passed region server. |
static ClusterConnection |
ConnectionUtils.createShortCircuitConnection(org.apache.hadoop.conf.Configuration conf,
ExecutorService pool,
User user,
ServerName serverName,
org.apache.hadoop.hbase.protobuf.generated.AdminProtos.AdminService.BlockingInterface admin,
org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ClientService.BlockingInterface client)
Creates a short-circuit connection that can bypass the RPC layer (serialization,
deserialization, networking, etc..) when talking to a local server.
|
static ClusterConnection |
ConnectionUtils.createShortCircuitHConnection(Connection conn,
ServerName serverName,
org.apache.hadoop.hbase.protobuf.generated.AdminProtos.AdminService.BlockingInterface admin,
org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ClientService.BlockingInterface client)
已过时。
|
org.apache.hadoop.hbase.protobuf.generated.AdminProtos.AdminService.BlockingInterface |
ClusterConnection.getAdmin(ServerName serverName)
Establishes a connection to the region server at the specified address.
|
org.apache.hadoop.hbase.protobuf.generated.AdminProtos.AdminService.BlockingInterface |
HConnection.getAdmin(ServerName serverName)
已过时。
internal method, do not use thru HConnection
|
org.apache.hadoop.hbase.protobuf.generated.AdminProtos.AdminService.BlockingInterface |
HConnection.getAdmin(ServerName serverName,
boolean getMaster)
已过时。
You can pass master flag but nothing special is done.
|
org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ClientService.BlockingInterface |
ClusterConnection.getClient(ServerName serverName)
Establishes a connection to the region server at the specified address, and returns
a region client protocol.
|
org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ClientService.BlockingInterface |
HConnection.getClient(ServerName serverName)
已过时。
internal method, do not use thru HConnection
|
List<HRegionInfo> |
HBaseAdmin.getOnlineRegions(ServerName sn)
Get all the online regions on a region server.
|
List<HRegionInfo> |
Admin.getOnlineRegions(ServerName sn)
Get all the online regions on a region server.
|
ServerStatistics |
ServerStatisticTracker.getStats(ServerName server) |
boolean |
ClusterConnection.isDeadServer(ServerName serverName)
已过时。
internal method, do not use thru HConnection
|
boolean |
HConnection.isDeadServer(ServerName serverName)
已过时。
internal method, do not use thru HConnection
|
void |
HBaseAdmin.rollWALWriter(ServerName serverName) |
void |
Admin.rollWALWriter(ServerName serverName)
Roll the log writer.
|
void |
HBaseAdmin.split(ServerName sn,
HRegionInfo hri,
byte[] splitPoint) |
void |
ClusterConnection.updateCachedLocations(TableName tableName,
byte[] regionName,
byte[] rowkey,
Object exception,
ServerName source)
Update the location cache.
|
void |
HConnection.updateCachedLocations(TableName tableName,
byte[] regionName,
byte[] rowkey,
Object exception,
ServerName source)
已过时。
internal method, do not use thru HConnection
|
void |
HBaseAdmin.updateConfiguration(ServerName server) |
void |
Admin.updateConfiguration(ServerName server)
Update the configuration and trigger an online config change
on the regionserver
|
void |
StatisticTrackable.updateRegionStats(ServerName server,
byte[] region,
org.apache.hadoop.hbase.protobuf.generated.ClientProtos.RegionLoadStats stats)
Update stats per region.
|
void |
MetricsConnection.updateRegionStats(ServerName serverName,
byte[] regionName,
org.apache.hadoop.hbase.protobuf.generated.ClientProtos.RegionLoadStats stats) |
void |
ServerStatisticTracker.updateRegionStats(ServerName server,
byte[] region,
org.apache.hadoop.hbase.protobuf.generated.ClientProtos.RegionLoadStats currentStats) |
void |
MetricsConnection.updateServerStats(ServerName serverName,
byte[] regionName,
Object r) |
static void |
ResultStatsUtil.updateStats(StatisticTrackable tracker,
ServerName server,
byte[] regionName,
org.apache.hadoop.hbase.protobuf.generated.ClientProtos.RegionLoadStats stats) |
static <T> T |
ResultStatsUtil.updateStats(T r,
ServerStatisticTracker serverStats,
ServerName server,
byte[] regionName)
Update the stats for the specified region if the result is an instance of
ResultStatsUtil |
限定符和类型 | 方法和说明 |
---|---|
List<ServerName> |
HBaseAdmin.clearDeadServers(List<ServerName> servers) |
List<ServerName> |
Admin.clearDeadServers(List<ServerName> servers)
Clear dead region servers from master.
|
List<Boolean> |
HBaseAdmin.clearSlowLogResponses(Set<ServerName> serverNames) |
List<Boolean> |
Admin.clearSlowLogResponses(Set<ServerName> serverNames)
Clears online slow/large RPC logs from the provided list of
RegionServers
|
List<LogEntry> |
HBaseAdmin.getLogEntries(Set<ServerName> serverNames,
String logType,
ServerType serverType,
int limit,
Map<String,Object> filterParams) |
List<LogEntry> |
Admin.getLogEntries(Set<ServerName> serverNames,
String logType,
ServerType serverType,
int limit,
Map<String,Object> filterParams)
Retrieve recent online records from HMaster / RegionServers.
|
限定符和类型 | 方法和说明 |
---|---|
long |
ClientBackoffPolicy.getBackoffTime(ServerName serverName,
byte[] region,
ServerStatistics stats) |
long |
ExponentialClientBackoffPolicy.getBackoffTime(ServerName serverName,
byte[] region,
ServerStatistics stats) |
long |
ClientBackoffPolicyFactory.NoBackoffPolicy.getBackoffTime(ServerName serverName,
byte[] region,
ServerStatistics stats) |
限定符和类型 | 方法和说明 |
---|---|
ServerName |
RegionMovedException.getServerName() |
构造器和说明 |
---|
PreemptiveFastFailException(long count,
long timeOfFirstFailureMilliSec,
long timeOfLatestAttemptMilliSec,
ServerName serverName) |
PreemptiveFastFailException(long count,
long timeOfFirstFailureMilliSec,
long timeOfLatestAttemptMilliSec,
ServerName serverName,
boolean guaranteedClientSideOnly) |
RegionMovedException(ServerName serverName,
long locationSeqNum) |
限定符和类型 | 方法和说明 |
---|---|
void |
AbstractRpcClient.cancelConnections(ServerName sn)
Interrupt the connections to the given ip:port server.
|
void |
RpcClient.cancelConnections(ServerName sn)
Interrupt the connections to the given server.
|
com.google.protobuf.BlockingRpcChannel |
AbstractRpcClient.createBlockingRpcChannel(ServerName sn,
User ticket,
int rpcTimeout) |
com.google.protobuf.BlockingRpcChannel |
RpcClient.createBlockingRpcChannel(ServerName sn,
User user,
int rpcTimeout)
Creates a "channel" that can be used by a blocking protobuf service.
|
com.google.protobuf.RpcChannel |
AbstractRpcClient.createRpcChannel(ServerName sn,
User user,
int rpcTimeout) |
com.google.protobuf.RpcChannel |
RpcClient.createRpcChannel(ServerName sn,
User user,
int rpcTimeout)
Creates a "channel" that can be used by a protobuf service.
|
构造器和说明 |
---|
RegionServerCoprocessorRpcChannel(ClusterConnection conn,
ServerName serverName) |
限定符和类型 | 方法和说明 |
---|---|
ServerName |
RegionState.getServerName() |
限定符和类型 | 方法和说明 |
---|---|
boolean |
RegionState.isOnServer(ServerName sn) |
boolean |
RegionState.isOpenOrMergingNewOnServer(ServerName sn) |
boolean |
RegionState.isOpenOrMergingOnServer(ServerName sn) |
boolean |
RegionState.isOpenOrSplittingNewOnServer(ServerName sn) |
boolean |
RegionState.isOpenOrSplittingOnServer(ServerName sn) |
boolean |
RegionState.isPendingCloseOrClosingOnServer(ServerName sn) |
boolean |
RegionState.isPendingOpenOrOpeningOnServer(ServerName sn) |
构造器和说明 |
---|
RegionState(HRegionInfo region,
RegionState.State state,
long stamp,
ServerName serverName) |
RegionState(HRegionInfo region,
RegionState.State state,
long stamp,
ServerName serverName,
long ritDuration) |
RegionState(HRegionInfo region,
RegionState.State state,
ServerName serverName) |
限定符和类型 | 方法和说明 |
---|---|
static ServerName |
ProtobufUtil.parseServerNameFrom(byte[] data)
Get a ServerName from the passed in data bytes.
|
static ServerName |
ProtobufUtil.toServerName(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.ServerName proto)
Convert a protocol buffer ServerName to a ServerName
|
限定符和类型 | 方法和说明 |
---|---|
static List<ServerName> |
ProtobufUtil.toServerNameList(List<org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.ServerName> proto)
Convert a list of protocol buffer ServerName to a list of ServerName
|
限定符和类型 | 方法和说明 |
---|---|
static org.apache.hadoop.hbase.protobuf.generated.AdminProtos.CloseRegionRequest |
RequestConverter.buildCloseRegionRequest(ServerName server,
byte[] regionName,
boolean transitionInZK)
Create a CloseRegionRequest for a given region name
|
static org.apache.hadoop.hbase.protobuf.generated.AdminProtos.CloseRegionRequest |
RequestConverter.buildCloseRegionRequest(ServerName server,
byte[] regionName,
int versionOfClosingNode,
ServerName destinationServer,
boolean transitionInZK) |
static org.apache.hadoop.hbase.protobuf.generated.AdminProtos.CloseRegionRequest |
RequestConverter.buildCloseRegionRequest(ServerName server,
String encodedRegionName,
boolean transitionInZK)
Create a CloseRegionRequest for a given encoded region name
|
static org.apache.hadoop.hbase.protobuf.generated.AdminProtos.GetServerInfoResponse |
ResponseConverter.buildGetServerInfoResponse(ServerName serverName,
int webuiPort)
A utility to build a GetServerInfoResponse.
|
static org.apache.hadoop.hbase.protobuf.generated.AdminProtos.OpenRegionRequest |
RequestConverter.buildOpenRegionRequest(ServerName server,
HRegionInfo region,
int versionOfOfflineNode,
List<ServerName> favoredNodes,
Boolean openForReplay)
Create a protocol buffer OpenRegionRequest for a given region
|
static org.apache.hadoop.hbase.protobuf.generated.AdminProtos.OpenRegionRequest |
RequestConverter.buildOpenRegionRequest(ServerName server,
List<Triple<HRegionInfo,Integer,List<ServerName>>> regionOpenInfos,
Boolean openForReplay)
Create a protocol buffer OpenRegionRequest to open a list of regions
|
static void |
ProtobufUtil.closeRegion(com.google.protobuf.RpcController controller,
org.apache.hadoop.hbase.protobuf.generated.AdminProtos.AdminService.BlockingInterface admin,
ServerName server,
byte[] regionName,
boolean transitionInZK)
A helper to close a region given a region name
using admin protocol.
|
static boolean |
ProtobufUtil.closeRegion(com.google.protobuf.RpcController controller,
org.apache.hadoop.hbase.protobuf.generated.AdminProtos.AdminService.BlockingInterface admin,
ServerName server,
byte[] regionName,
int versionOfClosingNode,
ServerName destinationServer,
boolean transitionInZK)
A helper to close a region given a region name
using admin protocol.
|
static void |
ProtobufUtil.openRegion(com.google.protobuf.RpcController controller,
org.apache.hadoop.hbase.protobuf.generated.AdminProtos.AdminService.BlockingInterface admin,
ServerName server,
HRegionInfo region)
A helper to open a region using admin protocol.
|
static org.apache.hadoop.hbase.protobuf.generated.WALProtos.RegionEventDescriptor |
ProtobufUtil.toRegionEventDescriptor(org.apache.hadoop.hbase.protobuf.generated.WALProtos.RegionEventDescriptor.EventType eventType,
byte[] tableNameAsBytes,
byte[] encodedNameAsBytes,
byte[] regionNameAsBytes,
long seqId,
ServerName server,
Map<byte[],List<org.apache.hadoop.fs.Path>> storeFiles) |
static org.apache.hadoop.hbase.protobuf.generated.WALProtos.RegionEventDescriptor |
ProtobufUtil.toRegionEventDescriptor(org.apache.hadoop.hbase.protobuf.generated.WALProtos.RegionEventDescriptor.EventType eventType,
HRegionInfo hri,
long seqId,
ServerName server,
Map<byte[],List<org.apache.hadoop.fs.Path>> storeFiles) |
static org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.ServerName |
ProtobufUtil.toServerName(ServerName serverName)
Convert a ServerName to a protocol buffer ServerName
|
限定符和类型 | 方法和说明 |
---|---|
ServerName |
MetaTableLocator.blockUntilAvailable(ZooKeeperWatcher zkw,
int replicaId,
long timeout)
Wait until the meta region is available and is not in transition.
|
ServerName |
MetaTableLocator.blockUntilAvailable(ZooKeeperWatcher zkw,
long timeout)
Wait until the meta region is available and is not in transition.
|
ServerName |
MasterAddressTracker.getMasterAddress()
Get the address of the current master if one is available.
|
ServerName |
MasterAddressTracker.getMasterAddress(boolean refresh)
Get the address of the current master if one is available.
|
static ServerName |
MasterAddressTracker.getMasterAddress(ZooKeeperWatcher zkw)
Get master address.
|
ServerName |
MetaTableLocator.getMetaRegionLocation(ZooKeeperWatcher zkw)
Gets the meta region location, if available.
|
ServerName |
MetaTableLocator.getMetaRegionLocation(ZooKeeperWatcher zkw,
int replicaId)
Gets the meta region location, if available.
|
ServerName |
MetaTableLocator.waitMetaRegionLocation(ZooKeeperWatcher zkw,
int replicaId,
long timeout)
Gets the meta region location, if available, and waits for up to the
specified timeout if not immediately available.
|
ServerName |
MetaTableLocator.waitMetaRegionLocation(ZooKeeperWatcher zkw,
long timeout)
Gets the meta region location, if available, and waits for up to the
specified timeout if not immediately available.
|
限定符和类型 | 方法和说明 |
---|---|
List<ServerName> |
MetaTableLocator.blockUntilAvailable(ZooKeeperWatcher zkw,
long timeout,
org.apache.hadoop.conf.Configuration conf)
Wait until the primary meta region is available.
|
static List<ServerName> |
MasterAddressTracker.getBackupMastersAndRenewWatch(ZooKeeperWatcher watcher) |
List<Pair<HRegionInfo,ServerName>> |
MetaTableLocator.getMetaRegionsAndLocations(ZooKeeperWatcher zkw) |
List<Pair<HRegionInfo,ServerName>> |
MetaTableLocator.getMetaRegionsAndLocations(ZooKeeperWatcher zkw,
int replicaId) |
限定符和类型 | 方法和说明 |
---|---|
static void |
ZKAssign.asyncCreateNodeOffline(ZooKeeperWatcher zkw,
HRegionInfo region,
ServerName serverName,
org.apache.zookeeper.AsyncCallback.StringCallback cb,
Object ctx)
Creates an unassigned node in the OFFLINE state for the specified region.
|
static int |
ZKAssign.confirmNodeOpening(ZooKeeperWatcher zkw,
HRegionInfo region,
ServerName serverName,
int expectedVersion)
Confirm an existing unassigned node for the specified region which is
currently in the OPENING state to be still in the OPENING state on
the specified server.
|
static int |
ZKAssign.createNodeClosing(ZooKeeperWatcher zkw,
HRegionInfo region,
ServerName serverName)
Creates a new unassigned node in the CLOSING state for the specified
region.
|
static void |
ZKAssign.createNodeOffline(ZooKeeperWatcher zkw,
HRegionInfo region,
ServerName serverName)
Creates a new unassigned node in the OFFLINE state for the specified region.
|
static void |
ZKAssign.createNodeOffline(ZooKeeperWatcher zkw,
HRegionInfo region,
ServerName serverName,
EventType event) |
static int |
ZKAssign.createOrForceNodeOffline(ZooKeeperWatcher zkw,
HRegionInfo region,
ServerName serverName)
Creates or force updates an unassigned node to the OFFLINE state for the
specified region.
|
static boolean |
ZKAssign.deleteClosedNode(ZooKeeperWatcher zkw,
String encodedRegionName,
ServerName sn)
Deletes an existing unassigned node that is in the CLOSED state for the
specified region.
|
static boolean |
ZKAssign.deleteClosingNode(ZooKeeperWatcher zkw,
HRegionInfo region,
ServerName sn)
Deletes an existing unassigned node that is in the CLOSING state for the
specified region.
|
static boolean |
ZKAssign.deleteNode(ZooKeeperWatcher zkw,
String encodedRegionName,
EventType expectedState,
ServerName sn)
Deletes an existing unassigned node that is in the specified state for the
specified region.
|
static boolean |
ZKAssign.deleteNode(ZooKeeperWatcher zkw,
String encodedRegionName,
EventType expectedState,
ServerName serverName,
int expectedVersion)
Deletes an existing unassigned node that is in the specified state for the
specified region.
|
static boolean |
ZKAssign.deleteOfflineNode(ZooKeeperWatcher zkw,
String encodedRegionName,
ServerName sn)
Deletes an existing unassigned node that is in the OFFLINE state for the
specified region.
|
static boolean |
ZKAssign.deleteOpenedNode(ZooKeeperWatcher zkw,
String encodedRegionName,
ServerName sn)
Deletes an existing unassigned node that is in the OPENED state for the
specified region.
|
int |
MasterAddressTracker.getBackupMasterInfoPort(ServerName sn)
Get the info port of the backup master if it is available.
|
static boolean |
MasterAddressTracker.setMasterAddress(ZooKeeperWatcher zkw,
String znode,
ServerName master,
int infoPort)
Set master address into the
master znode or into the backup
subdirectory of backup masters; switch off the passed in znode
path. |
static void |
MetaTableLocator.setMetaLocation(ZooKeeperWatcher zookeeper,
ServerName serverName,
int replicaId,
RegionState.State state)
Sets the location of
hbase:meta in ZooKeeper to the
specified server address. |
static void |
MetaTableLocator.setMetaLocation(ZooKeeperWatcher zookeeper,
ServerName serverName,
RegionState.State state)
Sets the location of
hbase:meta in ZooKeeper to the
specified server address. |
static int |
ZKAssign.transitionNode(ZooKeeperWatcher zkw,
HRegionInfo region,
ServerName serverName,
EventType beginState,
EventType endState,
int expectedVersion)
Method that actually performs unassigned node transitions.
|
static int |
ZKAssign.transitionNode(ZooKeeperWatcher zkw,
HRegionInfo region,
ServerName serverName,
EventType beginState,
EventType endState,
int expectedVersion,
byte[] payload) |
static int |
ZKAssign.transitionNodeClosed(ZooKeeperWatcher zkw,
HRegionInfo region,
ServerName serverName,
int expectedVersion)
Transitions an existing unassigned node for the specified region which is
currently in the CLOSING state to be in the CLOSED state.
|
static int |
ZKAssign.transitionNodeOpened(ZooKeeperWatcher zkw,
HRegionInfo region,
ServerName serverName,
int expectedVersion)
Transitions an existing unassigned node for the specified region which is
currently in the OPENING state to be in the OPENED state.
|
static int |
ZKAssign.transitionNodeOpening(ZooKeeperWatcher zkw,
HRegionInfo region,
ServerName serverName)
Transitions an existing unassigned node for the specified region which is
currently in the OFFLINE state to be in the OPENING state.
|
static int |
ZKAssign.transitionNodeOpening(ZooKeeperWatcher zkw,
HRegionInfo region,
ServerName serverName,
EventType beginState) |
Copyright © 2007–2022 The Apache Software Foundation. All rights reserved.