Package alluxio.scheduler.job
Class Task<V>
- java.lang.Object
-
- alluxio.scheduler.job.Task<V>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTask.TaskStatState of a task.
-
Constructor Summary
Constructors Constructor Description Task()Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intcompareTo(Task o)booleanequals(java.lang.Object obj)voidexecute(alluxio.client.block.stream.BlockWorkerClient client, alluxio.wire.WorkerInfo workerInfo)run the task and set the response future.alluxio.wire.WorkerInfogetMyRunningWorker()intgetPriority()com.google.common.util.concurrent.ListenableFuture<V>getResponseFuture()Task.TaskStatgetTaskStat()inthashCode()voidonComplete(java.util.concurrent.Executor executor)protected abstract com.google.common.util.concurrent.ListenableFuture<V>run(alluxio.client.block.stream.BlockWorkerClient client)run the task.TaskwithJob(Job job)
-
-
-
Field Detail
-
mMyJob
protected Job mMyJob
-
-
Method Detail
-
run
protected abstract com.google.common.util.concurrent.ListenableFuture<V> run(alluxio.client.block.stream.BlockWorkerClient client)
run the task.
-
getMyRunningWorker
public alluxio.wire.WorkerInfo getMyRunningWorker()
- Returns:
- my running worker
-
getResponseFuture
public com.google.common.util.concurrent.ListenableFuture<V> getResponseFuture()
- Returns:
- the response future
-
execute
public void execute(alluxio.client.block.stream.BlockWorkerClient client, alluxio.wire.WorkerInfo workerInfo)run the task and set the response future.- Parameters:
client- worker clientworkerInfo- the worker information
-
getTaskStat
public Task.TaskStat getTaskStat()
- Returns:
- task stat
-
getPriority
public int getPriority()
- Returns:
- priority
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
compareTo
public int compareTo(Task o)
- Specified by:
compareToin interfacejava.lang.Comparable<V>
-
onComplete
public void onComplete(java.util.concurrent.Executor executor)
- Parameters:
executor- the executor
-
-