|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.service.AbstractFederation.StartDeferredTasksTask
protected class AbstractFederation.StartDeferredTasksTask
This task runs periodically. Once AbstractFederation.getServiceUUID() reports a
non-null value, it will start an (optional)
AbstractStatisticsCollector, an (optional) httpd service, and
the (required) AbstractFederation.ReportTask.
Note: The AbstractFederation.ReportTask will relay any collected performance
counters to the ILoadBalancerService, but it also lets the
ILoadBalancerService know which services exist, which is
important for some of its functions.
Once these task(s) have been started, this task will throw an exception in order to prevent it from being re-executed. FIXME This should explicitly await jini registrar discovery, zookeeper client connected, and whatever other preconditions must be statisified before the service can be started.
| Field Summary | |
|---|---|
protected org.apache.log4j.Logger |
log
Note: The logger is named for this class, but since it is an inner class the name uses a "$" delimiter (vs a ".") between the outer and the inner class names. |
| Constructor Summary | |
|---|---|
AbstractFederation.StartDeferredTasksTask()
|
|
| Method Summary | |
|---|---|
void |
run()
|
protected boolean |
startDeferredTasks()
Starts performance counter collection once the service UUID
is known. |
protected void |
startHttpdService()
Start the local httpd service (if enabled). |
protected void |
startPerformanceCounterCollection()
Start collecting performance counters from the OS (if enabled). |
protected void |
startQueueStatisticsCollection()
Setup sampling on the client's thread pool. |
protected void |
startReportTask()
Start task to report service and counters to the load balancer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.apache.log4j.Logger log
| Constructor Detail |
|---|
public AbstractFederation.StartDeferredTasksTask()
| Method Detail |
|---|
public void run()
run in interface RunnableRuntimeException - once the deferred task(s) are running to prevent
re-execution of this startup task.
protected boolean startDeferredTasks()
throws IOException
UUID
is known.
true iff performance counter collection was
started.
IOException - if IService.getServiceUUID() throws this
exception (it never should since it is a local method
call).protected void startQueueStatisticsCollection()
protected void startPerformanceCounterCollection()
protected void startReportTask()
protected void startHttpdService()
throws UnsupportedEncodingException
IBigdataClient.getHttpdPort(), on a randomly assigned
port if the port is 0, or NOT started if the port is
-1. If the service is started, then the URL for the
service is reported to the load balancer and also written into the
file system. When started, the httpd service will be shutdown with
the federation.
UnsupportedEncodingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||