|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.service.ndx.pipeline.AbstractSubtask<HS,M,E,L>
com.bigdata.service.ndx.pipeline.AbstractPendingSetSubtask<HS,M,E,L>
public abstract class AbstractPendingSetSubtask<HS extends AbstractSubtaskStats,M extends AbstractPendingSetMasterTask<? extends AbstractPendingSetMasterStats<L,HS>,E,? extends AbstractPendingSetSubtask,L>,E,L>
Extended to assign chunks of work items to a remote
IAsynchronousClientTask, to track the set of outstanding
asynchronous operations for a specific client task (the "pending set"), and
to close the client task when the sink not assign any more work to that
client.
| Field Summary | |
|---|---|
protected IAsynchronousClientTask<?,E> |
clientTask
|
| Fields inherited from class com.bigdata.service.ndx.pipeline.AbstractSubtask |
|---|
buffer, lastChunkAvailableNanos, lastChunkNanos, locator, log, master, src, stats |
| Constructor Summary | |
|---|---|
AbstractPendingSetSubtask(M master,
L locator,
IAsynchronousClientTask<?,E> clientTask,
BlockingBuffer<E[]> buffer)
|
|
| Method Summary | |
|---|---|
protected boolean |
addPending(E e)
|
protected void |
awaitPending()
Wait until any asynchronous processing for the subtask is done. |
protected void |
cancelRemoteTask(boolean mayInterruptIfRunning)
Cancel the remote task. |
protected abstract Set<E> |
getPendingSet()
Return the pending set. |
int |
getPendingSetSize()
|
protected boolean |
handleChunk(E[] chunk)
Submits the chunk of resources for processing by the remote client task. |
protected void |
notifyClientOfRedirect(L locator,
Throwable cause)
Notify the client that the locator is stale. |
protected boolean |
removePending(E e)
|
| Methods inherited from class com.bigdata.service.ndx.pipeline.AbstractSubtask |
|---|
call, handleRedirect, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final IAsynchronousClientTask<?,E> clientTask
| Constructor Detail |
|---|
public AbstractPendingSetSubtask(M master,
L locator,
IAsynchronousClientTask<?,E> clientTask,
BlockingBuffer<E[]> buffer)
clientTask - The proxy for the remote client task.| Method Detail |
|---|
protected abstract Set<E> getPendingSet()
public int getPendingSetSize()
protected final void cancelRemoteTask(boolean mayInterruptIfRunning)
throws InterruptedException
AbstractSubtask
cancelRemoteTask in class AbstractSubtask<HS extends AbstractSubtaskStats,M extends AbstractPendingSetMasterTask<? extends AbstractPendingSetMasterStats<L,HS>,E,? extends AbstractPendingSetSubtask,L>,E,L>InterruptedException
protected final void awaitPending()
throws InterruptedException
AbstractSubtask
awaitPending in class AbstractSubtask<HS extends AbstractSubtaskStats,M extends AbstractPendingSetMasterTask<? extends AbstractPendingSetMasterStats<L,HS>,E,? extends AbstractPendingSetSubtask,L>,E,L>InterruptedExceptionprotected final boolean addPending(E e)
protected final boolean removePending(E e)
protected boolean handleChunk(E[] chunk)
throws ExecutionException,
InterruptedException,
IOException
handleChunk in class AbstractSubtask<HS extends AbstractSubtaskStats,M extends AbstractPendingSetMasterTask<? extends AbstractPendingSetMasterStats<L,HS>,E,? extends AbstractPendingSetSubtask,L>,E,L>chunk - A chunk of resources to be processed.
true iff the client will not accept additional
chunks.
IOException - RMI error.
ExecutionException
InterruptedException
protected void notifyClientOfRedirect(L locator,
Throwable cause)
AbstractSubtask
notifyClientOfRedirect in class AbstractSubtask<HS extends AbstractSubtaskStats,M extends AbstractPendingSetMasterTask<? extends AbstractPendingSetMasterStats<L,HS>,E,? extends AbstractPendingSetSubtask,L>,E,L>locator - The locator.cause - The cause.awaitPending() which might have to poll the future
of the client to make sure that it is still alive (or check w/ zk
but zk can disconnect clients overly eagerly)., This class ALSO needs to handle the resubmit of the resources
associated with the current submit. That will occur only when the
remote client task dies while invoking client#accept(chunk). The
AbstractPendingSetMasterTask needs to start a new client
task for the given ClientLocator, ideally on a different
IRemoteExecutor service. If there is no such available
service then it could multiplex multiple client#s onto the same
client, essentially doubling the load for some client. Or we could
hash partition based on the #of remaining clients, which would
distribute the load evenly over the remaining clients.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||