|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.service.jini.master.TaskMaster<S,T,U>
com.bigdata.service.jini.master.MappedTaskMaster<S,T,L,U,V>
S - The generic type of the MappedTaskMaster.JobState.T - The generic type of the client task.U - The generic type of the value returned by the client task.V - The generic type of the resources to be tasked.public abstract class MappedTaskMaster<S extends MappedTaskMaster.JobState,T extends AbstractAsynchronousClientTask<U,V,L>,L extends ClientLocator,U,V extends Serializable>
Extends the TaskMaster to assign chunks of resources for processing
to the client tasks.
The master scans a source such as the file system, a distributed file system, or a scale-out index to identify the resources to be processed. The resources are placed onto a hash-partitioned buffer, which is drained by the various clients. If a client succeeds, then the resources have been handled successfully and a new set of resources is assigned to that client. If a client fails, the resources are reassigned to a different client. If all clients fail, the job is aborted.
| Nested Class Summary | |
|---|---|
static interface |
MappedTaskMaster.ConfigurationOptions
Configuration options for the RDFDataLoadMaster. |
static class |
MappedTaskMaster.JobState
The job description for an RDFDataLoadMaster. |
| Nested classes/interfaces inherited from class com.bigdata.service.jini.master.TaskMaster |
|---|
TaskMaster.DiscoveredServices |
| Field Summary |
|---|
| Fields inherited from class com.bigdata.service.jini.master.TaskMaster |
|---|
fed, log |
| Constructor Summary | |
|---|---|
MappedTaskMaster(JiniFederation<?> fed)
|
|
| Method Summary | |
|---|---|
protected abstract T |
newClientTask(INotifyOutcome<V,L> notifyProxy,
L locator)
Factory for new client tasks. |
protected T |
newClientTask(int clientNum)
Unsupported -- see #newClientTask(INotifyOutcome, int). |
BlockingBuffer<V[]> |
newResourceBuffer()
Allocate and start processing for the buffer used to hand off resources for processing to the clients. |
protected void |
runJob()
Runs the scanner, handing off resources to clients for processing. |
| Methods inherited from class com.bigdata.service.jini.master.TaskMaster |
|---|
allDone, attachPerformanceCounters, awaitAll, beginJob, call, cancelAll, detachPerformanceCounters, error, execute, forceOverflow, getFederation, getJobState, innerMain, newJobState, notifyOutcome, setupJob, startClients, success, tearDownJob |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MappedTaskMaster(JiniFederation<?> fed)
throws net.jini.config.ConfigurationException
net.jini.config.ConfigurationException| Method Detail |
|---|
protected void runJob()
throws Exception
IAsynchronousClientTask.close() the clientTask. This prevents
workload starvation during the shutdown protocol.
runJob in class TaskMaster<S extends MappedTaskMaster.JobState,T extends AbstractAsynchronousClientTask<U,V,L>,U>Exception - Client execution problem.
InterruptedException - Master interrupted awaiting clients.public BlockingBuffer<V[]> newResourceBuffer()
MappedTaskMaster requires
overriding the behavior of the ResourceBufferTask. It
should be parameterized if possible with interfaces for interesting
things, however its termination logic is tricky and overrides
should not mess with that.protected T newClientTask(int clientNum)
#newClientTask(INotifyOutcome, int).
newClientTask in class TaskMaster<S extends MappedTaskMaster.JobState,T extends AbstractAsynchronousClientTask<U,V,L>,U>clientNum - The client number.
UnsupportedOperationException - always.AbstractClientTask
protected abstract T newClientTask(INotifyOutcome<V,L> notifyProxy,
L locator)
notifyProxy - The proxy for the object to which the client must deliver
notice of success or failure for each processed resource.locator - The locator for the client on which the task will be executed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||