public class SamzaTaskProxy extends java.lang.Object implements TaskProxy
TaskProxy
interface implementation for samza jobs running in yarn execution environment.
getTasks implementation reads the jobModel of the job specified by JobInstance
from coordinator stream.Constructor and Description |
---|
SamzaTaskProxy(TaskResourceConfig taskResourceConfig,
InstallationFinder installFinder) |
Modifier and Type | Method and Description |
---|---|
protected org.apache.samza.job.model.JobModel |
getJobModel(JobInstance jobInstance)
Retrieves the jobModel from the jobCoordinator.
|
java.util.List<Task> |
getTasks(JobInstance jobInstance)
Fetches the complete job model from the coordinator stream based upon the provided
JobInstance
param, transforms it to a list of Task and returns it. |
public SamzaTaskProxy(TaskResourceConfig taskResourceConfig, InstallationFinder installFinder)
public java.util.List<Task> getTasks(JobInstance jobInstance) throws java.io.IOException, java.lang.InterruptedException
JobInstance
param, transforms it to a list of Task
and returns it.
getTasks
in interface TaskProxy
jobInstance
- the job instance to get the tasks for.Task
tasks that belongs to the JobInstance
.
Each task will have a preferred host and stream partitions assigned to it by
the samza job coordinator.java.io.IOException
- if there was a problem executing the command to get the tasks.java.lang.InterruptedException
- if the thread was interrupted while waiting for the result.protected org.apache.samza.job.model.JobModel getJobModel(JobInstance jobInstance)
jobInstance
- the job instance (jobId, jobName).