public class LocalWorkpoolImpl extends java.lang.Object implements LocalWorkpoolServer, CheckpointListener
| Modifier and Type | Class and Description |
|---|---|
class |
LocalWorkpoolImpl.PrintProgressStatusThread |
| Modifier and Type | Field and Description |
|---|---|
Config |
configParams |
static long |
GAP_TIME |
boolean |
globalValidationEnable |
java.lang.String |
modelType |
java.lang.String |
myHost |
LocalWorkpoolImpl.PrintProgressStatusThread |
progressStatusThread |
boolean |
recovery |
static java.lang.String |
RPC_MECHANISM |
static long |
SLEEP_TIME |
int |
status |
static long |
STS_DELAY |
TaskComparator |
taskComparator |
ValidationService |
validationService |
| Constructor and Description |
|---|
LocalWorkpoolImpl(java.lang.String validationHostDetail,
int workerCount,
int[] partitionedGraphHostNodesTable) |
LocalWorkpoolImpl(java.lang.String validationHostDetail,
int workerCount,
int[] partitionedGraphHostNodesTable,
boolean recover) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTask(Task t) |
void |
addTask(java.util.Vector<Task> taskVector) |
void |
barrierJoin(java.lang.String remoteHost) |
void |
beginQuiescent() |
void |
broadcast(Task t) |
void |
checkpoint() |
void |
checkQuiescent() |
LoadInfo |
depositTasks(java.util.Vector<Task> taskList) |
void |
endQuiescent() |
LoadInfo |
getLoadInfo() |
java.lang.String |
getNewTID() |
java.lang.String |
getStats() |
int |
getStatus() |
long |
getSTS()
Synchronizes the local stable timestamp with that of the global timestamp
|
WorkStatus |
getTask() |
LoadInfo |
getTerminationStatus(int oldts,
int newts) |
WorkStatus |
getWorkStatus() |
void |
lookupPeers(java.util.Vector<java.lang.String> hostList) |
void |
pause() |
void |
removeTask(Task t)
Removes a task from the active workpool.
|
void |
reportAbortOnStart() |
void |
reportCompletion(Task t,
java.util.HashSet<Task> tasksCreated)
A means to report the completion of the execution of a task.
|
void |
reportInitialization() |
void |
reportJobCompletion() |
void |
reportQuiescent(java.lang.String remoteHost) |
void |
reportStartup() |
void |
reportTransactionCompletion(java.util.HashSet<Task> tasksCreated) |
void |
reportTransactionCompletion(long commitTS,
java.util.HashSet<Task> tasksCreated)
Provides the ability to report that a transaction/computation which does not rely on a Task structure has
completed
|
void |
saveState() |
void |
setStatusInit() |
void |
start() |
void |
updateLoadInfo(java.util.Vector<LoadInfo> loadVector)
Each workpool caches the
LoadInfo of its peers. |
ValidateResponse |
validate(Task t,
RWSetInfo rwSetInfo) |
ValidateResponse |
validateTransaction(TransactionInfo txnInfo,
RWSetInfo rwSetInfo)
Provides the ability to validate a transaction/computation that does not rely on a Task structure
|
public ValidationService validationService
public java.lang.String myHost
public LocalWorkpoolImpl.PrintProgressStatusThread progressStatusThread
public Config configParams
public static long SLEEP_TIME
public static long GAP_TIME
public static long STS_DELAY
public java.lang.String modelType
public static java.lang.String RPC_MECHANISM
public boolean globalValidationEnable
public int status
public TaskComparator taskComparator
public boolean recovery
public LocalWorkpoolImpl(java.lang.String validationHostDetail,
int workerCount,
int[] partitionedGraphHostNodesTable)
throws java.io.IOException
java.io.IOExceptionpublic LocalWorkpoolImpl(java.lang.String validationHostDetail,
int workerCount,
int[] partitionedGraphHostNodesTable,
boolean recover)
throws java.io.IOException
java.io.IOExceptionpublic LoadInfo depositTasks(java.util.Vector<Task> taskList) throws java.rmi.RemoteException
depositTasks in interface LocalWorkpoolServerjava.rmi.RemoteExceptionpublic void reportJobCompletion()
throws java.rmi.RemoteException
reportJobCompletion in interface LocalWorkpoolServerjava.rmi.RemoteExceptionpublic void reportAbortOnStart()
public LoadInfo getLoadInfo() throws java.rmi.RemoteException
getLoadInfo in interface LocalWorkpoolServerjava.rmi.RemoteExceptionpublic LoadInfo getTerminationStatus(int oldts, int newts) throws java.rmi.RemoteException
getTerminationStatus in interface LocalWorkpoolServerjava.rmi.RemoteExceptionpublic void barrierJoin(java.lang.String remoteHost)
barrierJoin in interface LocalWorkpoolServerpublic void pause()
throws java.rmi.RemoteException
java.rmi.RemoteExceptionpublic void start()
throws java.rmi.RemoteException
java.rmi.RemoteExceptionpublic void saveState()
throws java.rmi.RemoteException
saveState in interface LocalWorkpoolServerjava.rmi.RemoteExceptionpublic void checkpoint()
checkpoint in interface CheckpointListenerpublic void beginQuiescent()
throws java.rmi.RemoteException
beginQuiescent in interface LocalWorkpoolServerjava.rmi.RemoteExceptionpublic void reportQuiescent(java.lang.String remoteHost)
reportQuiescent in interface LocalWorkpoolServerpublic void endQuiescent()
endQuiescent in interface LocalWorkpoolServerpublic void checkQuiescent()
public void lookupPeers(java.util.Vector<java.lang.String> hostList)
public void reportInitialization()
throws java.rmi.RemoteException
reportInitialization in interface LocalWorkpoolServerjava.rmi.RemoteExceptionpublic void reportStartup()
throws java.rmi.RemoteException
java.rmi.RemoteExceptionpublic int getStatus()
public WorkStatus getWorkStatus()
public void setStatusInit()
public void broadcast(Task t) throws java.rmi.RemoteException
java.rmi.RemoteExceptionpublic void addTask(Task t) throws java.rmi.RemoteException
java.rmi.RemoteExceptionpublic void addTask(java.util.Vector<Task> taskVector) throws java.rmi.RemoteException
java.rmi.RemoteExceptionpublic WorkStatus getTask() throws java.rmi.RemoteException
java.rmi.RemoteExceptionpublic java.lang.String getNewTID()
public ValidateResponse validate(Task t, RWSetInfo rwSetInfo) throws java.rmi.RemoteException
java.rmi.RemoteExceptionpublic ValidateResponse validateTransaction(TransactionInfo txnInfo, RWSetInfo rwSetInfo) throws java.rmi.RemoteException
txnInfo - The transaction's informationrwSetInfo - A set of nodeIds that may have been read or written to during the computationjava.rmi.RemoteExceptionpublic long getSTS()
throws java.rmi.RemoteException
java.rmi.RemoteException - Thrown if the ValidationService could not be contactedpublic void updateLoadInfo(java.util.Vector<LoadInfo> loadVector)
LoadInfo of its peers. This is a means for this workpool to refresh its
cache.loadVector - The new loads of each workpool.public void removeTask(Task t)
t - The task that is to be removed.public void reportCompletion(Task t, java.util.HashSet<Task> tasksCreated) throws java.rmi.RemoteException
t - The task that is to reported for completiontasksCreated - Any tasks created by the completed taskjava.rmi.RemoteException - Thrown if the created tasks could not be distributedpublic void reportTransactionCompletion(long commitTS,
java.util.HashSet<Task> tasksCreated)
throws java.rmi.RemoteException
commitTS - The time at which the transaction was completedtasksCreated - Any tasks created by the completed taskjava.rmi.RemoteException - Thrown if the created tasks could not be distributedpublic void reportTransactionCompletion(java.util.HashSet<Task> tasksCreated) throws java.rmi.RemoteException
java.rmi.RemoteExceptionpublic java.lang.String getStats()