|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.service.FederationCallable<U>
com.bigdata.service.jini.master.AbstractAsynchronousClientTask<Void,V,L>
com.bigdata.rdf.load.MappedRDFFileLoadTask<S,V,L>
S - The generic for the MappedRDFDataLoadMaster.JobState.V - The generic type of the client state (stored in zookeeper).public class MappedRDFFileLoadTask<S extends MappedRDFDataLoadMaster.JobState,V extends Serializable,L extends ClientLocator>
Task reads files from the file system, loads them into an
ITripleStore, and optionally deletes the source files once they are
restart safe on the database. This is a non-transactional bulk load using
unisolated writes. This task may be used in conjunction with any process that
writes files into a known directory on the hosts of a cluster.
Note: Counters reporting the progress of this task will be attached to the service within which this task is executing.
Note: When loading files from a local file system, this task can not handle the death of the service on which it is running.
| Field Summary | |
|---|---|
protected S |
jobState
|
protected L |
locator
|
protected static org.apache.log4j.Logger |
log
|
| Constructor Summary | |
|---|---|
MappedRDFFileLoadTask(S jobState,
INotifyOutcome<V,L> notifyProxy,
L locator)
|
|
| Method Summary | |
|---|---|
void |
accept(V[] chunk)
Accept a chunk of resources for processing. |
protected void |
awaitReady()
Block until call() has fully initialized the instance of this
class running on the IRemoteExecutor. |
Void |
call()
|
void |
close()
Signal that no new chunks will be tasked to client. |
JiniFederation<?> |
getFederation()
The federation object used by the IRemoteExecutor on which this
task is executing. |
protected void |
setUp()
|
String |
toString()
|
| Methods inherited from class com.bigdata.service.jini.master.AbstractAsynchronousClientTask |
|---|
getFuture, getNotifyProxy, setFuture |
| Methods inherited from class com.bigdata.service.FederationCallable |
|---|
setFederation |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final transient org.apache.log4j.Logger log
protected final S extends MappedRDFDataLoadMaster.JobState jobState
protected final L extends ClientLocator locator
| Constructor Detail |
|---|
public MappedRDFFileLoadTask(S jobState,
INotifyOutcome<V,L> notifyProxy,
L locator)
| Method Detail |
|---|
public String toString()
toString in class Objectpublic JiniFederation<?> getFederation()
IRemoteExecutor on which this
task is executing.
getFederation in interface IFederationCallablegetFederation in class FederationCallable<Void>null.
protected void setUp()
throws InterruptedException
InterruptedException
public Void call()
throws Exception
call in interface Callable<Void>Exception
protected void awaitReady()
throws InterruptedException
call() has fully initialized the instance of this
class running on the IRemoteExecutor. This method should be used
to guard methods on this or derived classes which can be invoked by RMI
and which depend on setUp().
InterruptedException
public void accept(V[] chunk)
throws RemoteException,
InterruptedException
IAsynchronousClientTask
accept in interface IAsynchronousClientTask<Void,V extends Serializable>chunk - The chunk of resources to be processed. Each resource is
normally a file path, URL, etc.
RemoteException - if there is an RMI problem.
InterruptedException - if the client thread accepting the request is interrupted.
public void close()
throws RemoteException,
InterruptedException
IAsynchronousClientTaskCallable.call() until the master
interrupts the client using Future.cancel(boolean). However, if
all work is complete, then the client MAY interrupt the main thread.
close in interface IAsynchronousClientTask<Void,V extends Serializable>RemoteException - if there is an RMI problem.
InterruptedException - if the client thread accepting the request is interrupted.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||