@InterfaceAudience.Private public interface ClusterInfoProvider extends ConfigurationObserver
Modifier and Type | Method and Description |
---|---|
HDFSBlocksDistribution |
computeHDFSBlocksDistribution(org.apache.hadoop.conf.Configuration conf,
TableDescriptor tableDescriptor,
RegionInfo regionInfo)
Compute the block distribution for the given region.
|
List<RegionInfo> |
getAssignedRegions()
Get all the regions of this cluster.
|
org.apache.hadoop.conf.Configuration |
getConfiguration()
Get the configuration.
|
Connection |
getConnection()
Returns a reference to the cluster's connection.
|
ServerMetrics |
getLoad(ServerName serverName)
Returns server metrics of the given server if serverName is known else null
|
int |
getNumberOfTables()
Returns the number of tables on this cluster.
|
List<ServerName> |
getOnlineServersList()
Returns a copy of the internal list of online servers.
|
List<ServerName> |
getOnlineServersListWithPredicator(List<ServerName> servers,
Predicate<ServerMetrics> filter)
Returns a copy of the internal list of online servers matched by the given
filter . |
Map<ServerName,List<RegionInfo>> |
getSnapShotOfAssignment(Collection<RegionInfo> regions)
Get a snapshot of the current assignment status.
|
TableDescriptor |
getTableDescriptor(TableName tableName)
Get the table descriptor for the given table.
|
boolean |
hasRegionReplica(Collection<RegionInfo> regions)
Check whether we have region replicas enabled for the tables of the given regions.
|
boolean |
isOffPeakHour()
Test whether we are in off peak hour.
|
void |
recordBalancerDecision(Supplier<BalancerDecision> decision)
Record the given balancer decision.
|
void |
recordBalancerRejection(Supplier<BalancerRejection> rejection)
Record the given balancer rejection.
|
void |
unassign(RegionInfo regionInfo)
Unassign the given region.
|
onConfigurationChange
org.apache.hadoop.conf.Configuration getConfiguration()
Connection getConnection()
List<RegionInfo> getAssignedRegions()
void unassign(RegionInfo regionInfo) throws IOException
IOException
TableDescriptor getTableDescriptor(TableName tableName) throws IOException
IOException
int getNumberOfTables() throws IOException
IOException
HDFSBlocksDistribution computeHDFSBlocksDistribution(org.apache.hadoop.conf.Configuration conf, TableDescriptor tableDescriptor, RegionInfo regionInfo) throws IOException
IOException
boolean hasRegionReplica(Collection<RegionInfo> regions) throws IOException
IOException
List<ServerName> getOnlineServersList()
List<ServerName> getOnlineServersListWithPredicator(List<ServerName> servers, Predicate<ServerMetrics> filter)
filter
.Map<ServerName,List<RegionInfo>> getSnapShotOfAssignment(Collection<RegionInfo> regions)
boolean isOffPeakHour()
void recordBalancerDecision(Supplier<BalancerDecision> decision)
void recordBalancerRejection(Supplier<BalancerRejection> rejection)
ServerMetrics getLoad(ServerName serverName)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.