|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ILoadBalancerService
Interface for collecting, reporting, and decision-making based on node and service utilization statistics.
| Method Summary | |
|---|---|
UUID |
getUnderUtilizedDataService()
Return the UUID of an under-utilized data service. |
UUID[] |
getUnderUtilizedDataServices(int minCount,
int maxCount,
UUID exclude)
Return up to limit IDataService UUIDs that are
currently under-utilized. |
boolean |
isHighlyUtilizedDataService(UUID serviceUUID)
Return true if the service is considered to be "highly
utilized". |
boolean |
isUnderUtilizedDataService(UUID serviceUUID)
Return true if the service is considered to be
"under-utilized". |
void |
notify(UUID serviceUUID,
byte[] data)
Send performance counters. |
void |
urgent(String msg,
UUID serviceUUID)
An urgent warning issued the caller is in immediate danger of depleting its resources with a consequence of immediate service and/or host failure(s). |
void |
warn(String msg,
UUID serviceUUID)
A warning issued by a client when it is in danger of depleting its resources. |
| Methods inherited from interface com.bigdata.service.IService |
|---|
destroy, getHostname, getServiceIface, getServiceName, getServiceUUID |
| Methods inherited from interface com.bigdata.service.IEventReceivingService |
|---|
notifyEvent |
| Method Detail |
|---|
void notify(UUID serviceUUID,
byte[] data)
throws IOException
serviceUUID - The service UUID that is self-reporting.data - The serialized performance counter data.
IOException
void warn(String msg,
UUID serviceUUID)
throws IOException
msg - A message.serviceUUID - The service UUID that is self-reporting.
IOException
void urgent(String msg,
UUID serviceUUID)
throws IOException
msg - A message.serviceUUID - The service UUID that is self-reporting.
IOException
UUID getUnderUtilizedDataService()
throws IOException,
TimeoutException,
InterruptedException
UUID of an under-utilized data service. If there is no
under-utilized service, then return the UUID of the service with
the least load.
TimeoutException - if there are no data services and a timeout occurs while
awaiting a service join.
InterruptedException - if the request is interrupted.
IOException
UUID[] getUnderUtilizedDataServices(int minCount,
int maxCount,
UUID exclude)
throws IOException,
TimeoutException,
InterruptedException
IDataService UUIDs that are
currently under-utilized.
When minCount is positive, this method will always return at
least minCount service UUIDs, however the UUIDs
returned MAY contain duplicates if the LoadBalancerService has a
strong preference for allocating load to some services (or for NOT
allocating load to other services). Further, the
LoadBalancerService MAY choose (or be forced to choose) to return
UUIDs for services that are within a nominal utilization range,
or even UUIDs for services that are highly-utilized if it could
otherwise not satisify the request.
minCount - The minimum #of services UUIDs to return -or- zero
(0) if there is no minimum limit.maxCount - The maximum #of services UUIDs to return -or- zero
(0) if there is no maximum limit.exclude - The optional UUID of a data service to be excluded
from the returned set.
null IFF no services are recommended at this time
as needing additional load.
TimeoutException - if there are no data services, or if there is only a single
data service and it is excluded by the request, and a timeout
occurs while awaiting a service join.
InterruptedException - if the request is interrupted.
IOExceptionIBigdataClients,
etc., probably should use Integer.MAX_VALUE rather than ZERO for
the "no limit" signifier for [maxCount].
boolean isHighlyUtilizedDataService(UUID serviceUUID)
throws IOException
true if the service is considered to be "highly
utilized".
Note: This is used mainly to decide when a service should attempt to shed index partitions. This implementation SHOULD reflect the relative rank of the service among all services as well as its absolute load.
serviceUUID - The service UUID.
true if the service is considered to be "highly
utilized".
IOException
boolean isUnderUtilizedDataService(UUID serviceUUID)
throws IOException
true if the service is considered to be
"under-utilized".
serviceUUID - The service UUID.
true if the service is considered to be "under-utilized".
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||