Spring for Apache Hadoop

org.springframework.yarn.batch.repository
Class JobRepositoryRpcFactory

java.lang.Object
  extended by org.springframework.yarn.batch.repository.JobRepositoryRpcFactory

public class JobRepositoryRpcFactory
extends java.lang.Object

Helper class providing factory methods for building requests used in remote job repository functionality.

Author:
Janne Valkealahti

Constructor Summary
JobRepositoryRpcFactory()
           
 
Method Summary
static AddStepExecutionsReq buildAddStepExecutionsReq(org.springframework.batch.core.JobExecution jobExecution)
          Builds request for adding step executionf from a job execution.
static CreateJobInstanceReq buildCreateJobInstanceReq(java.lang.String jobName, org.springframework.batch.core.JobParameters jobParameters)
          Builds request for creating a job instance.
static FindJobExecutionsReq buildFindJobExecutionsReq(org.springframework.batch.core.JobInstance jobInstance)
          Builds request for finding a job execution by a job instance.
static FindRunningJobExecutionsReq buildFindRunningJobExecutionsReq(java.lang.String jobName)
          Builds request for finding a job executions by a job name.
static GetExecutionContextReq buildGetExecutionContextReq(org.springframework.batch.core.JobExecution jobExecution)
          Builds request for getting execution context from a job execution.
static GetExecutionContextReq buildGetExecutionContextReq(org.springframework.batch.core.StepExecution stepExecution)
          Builds request for getting execution context from a step execution.
static GetJobExecutionReq buildGetJobExecutionReq(java.lang.Long executionId)
          Builds request for getting a job execution by its execution id.
static GetJobInstanceByIdReq buildGetJobInstanceByIdReq(java.lang.Long id)
          Builds request for getting a job instance by id.
static GetJobInstanceReq buildGetJobInstanceReq(java.lang.String jobName, org.springframework.batch.core.JobParameters jobParameters)
          Builds request for getting a job instance.
static GetJobInstancesReq buildGetJobInstancesReq(java.lang.String jobName, int start, int count)
          Builds request for getting a job instance by its name and paging info.
static GetJobNamesReq buildGetJobNamesReq()
          Builds request for getting a job names.
static GetLastJobExecutionReq buildGetLastJobExecutionReq(org.springframework.batch.core.JobInstance jobInstance)
          Builds request for getting a last execution by a job instance.
static GetStepExecutionReq buildGetStepExecutionReq(org.springframework.batch.core.JobExecution jobExecution, java.lang.Long stepExecutionId)
          Builds request for getting a step execution job execution and step execution id.
static SaveExecutionContextReq buildSaveExecutionContextReq(org.springframework.batch.core.JobExecution jobExecution)
          Builds request for saving execution context from a job execution.
static SaveExecutionContextReq buildSaveExecutionContextReq(org.springframework.batch.core.StepExecution stepExecution)
          Builds request for saving execution context from a step execution.
static SaveJobExecutionReq buildSaveJobExecutionReq(org.springframework.batch.core.JobExecution jobExecution)
          Builds request for saving a job execution.
static SaveStepExecutionReq buildSaveStepExecutionReq(org.springframework.batch.core.StepExecution stepExecution)
          Builds request for saving a step execution.
static SynchronizeStatusReq buildSynchronizeStatusReq(org.springframework.batch.core.JobExecution jobExecution)
          Builds request for synchronizing a job execution status.
static UpdateExecutionContextReq buildUpdateExecutionContextReq(org.springframework.batch.core.JobExecution jobExecution)
          Builds request for updating execution context from a job execution.
static UpdateExecutionContextReq buildUpdateExecutionContextReq(org.springframework.batch.core.StepExecution stepExecution)
          Builds request for updating execution context from a step execution.
static UpdateJobExecutionReq buildUpdateJobExecutionReq(org.springframework.batch.core.JobExecution jobExecution)
          Builds request for updating a job execution.
static UpdateStepExecutionReq buildUpdateStepExecutionReq(org.springframework.batch.core.StepExecution stepExecution)
          Builds request for updating a step execution.
static ExecutionContextType convertExecutionContext(org.springframework.batch.item.ExecutionContext executionContext)
          Converts a ExecutionContext to ExecutionContextType.
static org.springframework.batch.item.ExecutionContext convertExecutionContextType(ExecutionContextType executionContextType)
          Converts a ExecutionContextType to ExecutionContext.
static JobExecutionType convertJobExecutionType(org.springframework.batch.core.JobExecution jobExecution)
          Creates JobExecutionType from JobExecution.
static JobExecutionType convertJobExecutionType(org.springframework.batch.core.JobExecution jobExecution, org.springframework.batch.core.StepExecution stepExecution)
          Creates JobExecutionType from JobExecution.
static org.springframework.batch.core.JobExecution convertJobExecutionType(JobExecutionType type)
          Converts a JobExecutionType to JobExecution.
static JobInstanceType convertJobInstanceType(org.springframework.batch.core.JobInstance jobInstance)
          Converts a JobInstance to JobInstanceType.
static org.springframework.batch.core.JobInstance convertJobInstanceType(JobInstanceType type)
          Converts a JobInstanceType to JobInstance.
static JobParametersType convertJobParameters(org.springframework.batch.core.JobParameters jobParameters)
          Converts a JobParameters to JobParametersType.
static org.springframework.batch.core.JobParameters convertJobParametersType(JobParametersType type)
          Converts a JobParametersType to JobParameters.
static StepExecutionType convertStepExecutionType(org.springframework.batch.core.StepExecution stepExecution)
          Creates StepExecutionType from StepExecution.
static StepExecutionType convertStepExecutionType(org.springframework.batch.core.StepExecution stepExecution, org.springframework.batch.core.JobExecution jobExecution)
          Creates StepExecutionType from StepExecution.
static org.springframework.batch.core.StepExecution convertStepExecutionType(StepExecutionType type)
          Converts a StepExecutionType to StepExecution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobRepositoryRpcFactory

public JobRepositoryRpcFactory()
Method Detail

buildSaveStepExecutionReq

public static SaveStepExecutionReq buildSaveStepExecutionReq(org.springframework.batch.core.StepExecution stepExecution)
Builds request for saving a step execution.

Parameters:
stepExecution - the step execution
Returns:
the SaveStepExecutionReq request

buildAddStepExecutionsReq

public static AddStepExecutionsReq buildAddStepExecutionsReq(org.springframework.batch.core.JobExecution jobExecution)
Builds request for adding step executionf from a job execution.

Parameters:
jobExecution - the job execution
Returns:
the AddStepExecutionsReq request

buildUpdateStepExecutionReq

public static UpdateStepExecutionReq buildUpdateStepExecutionReq(org.springframework.batch.core.StepExecution stepExecution)
Builds request for updating a step execution.

Parameters:
stepExecution - the step execution
Returns:
the UpdateStepExecutionReq request

buildGetStepExecutionReq

public static GetStepExecutionReq buildGetStepExecutionReq(org.springframework.batch.core.JobExecution jobExecution,
                                                           java.lang.Long stepExecutionId)
Builds request for getting a step execution job execution and step execution id.

Parameters:
jobExecution - the job execution
stepExecutionId - the step execution id
Returns:
the GetStepExecutionReq request

buildUpdateJobExecutionReq

public static UpdateJobExecutionReq buildUpdateJobExecutionReq(org.springframework.batch.core.JobExecution jobExecution)
Builds request for updating a job execution.

Parameters:
jobExecution - the job execution
Returns:
the UpdateJobExecutionReq request

buildSynchronizeStatusReq

public static SynchronizeStatusReq buildSynchronizeStatusReq(org.springframework.batch.core.JobExecution jobExecution)
Builds request for synchronizing a job execution status.

Parameters:
jobExecution - the job execution
Returns:
the SynchronizeStatusReq request

buildSaveJobExecutionReq

public static SaveJobExecutionReq buildSaveJobExecutionReq(org.springframework.batch.core.JobExecution jobExecution)
Builds request for saving a job execution.

Parameters:
jobExecution - the job execution
Returns:
the SaveJobExecutionReq request

buildSaveExecutionContextReq

public static SaveExecutionContextReq buildSaveExecutionContextReq(org.springframework.batch.core.StepExecution stepExecution)
Builds request for saving execution context from a step execution.

Parameters:
stepExecution - the step execution
Returns:
the SaveExecutionContextReq request

buildSaveExecutionContextReq

public static SaveExecutionContextReq buildSaveExecutionContextReq(org.springframework.batch.core.JobExecution jobExecution)
Builds request for saving execution context from a job execution.

Parameters:
jobExecution - the job execution
Returns:
the SaveExecutionContextReq request

buildUpdateExecutionContextReq

public static UpdateExecutionContextReq buildUpdateExecutionContextReq(org.springframework.batch.core.StepExecution stepExecution)
Builds request for updating execution context from a step execution.

Parameters:
stepExecution - the step execution
Returns:
the UpdateExecutionContextReq request

buildUpdateExecutionContextReq

public static UpdateExecutionContextReq buildUpdateExecutionContextReq(org.springframework.batch.core.JobExecution jobExecution)
Builds request for updating execution context from a job execution.

Parameters:
jobExecution - the job execution
Returns:
the UpdateExecutionContextReq request

buildGetExecutionContextReq

public static GetExecutionContextReq buildGetExecutionContextReq(org.springframework.batch.core.StepExecution stepExecution)
Builds request for getting execution context from a step execution.

Parameters:
stepExecution - the step execution
Returns:
the GetExecutionContextReq request

buildGetExecutionContextReq

public static GetExecutionContextReq buildGetExecutionContextReq(org.springframework.batch.core.JobExecution jobExecution)
Builds request for getting execution context from a job execution.

Parameters:
jobExecution - the step execution
Returns:
the GetExecutionContextReq request

convertStepExecutionType

public static StepExecutionType convertStepExecutionType(org.springframework.batch.core.StepExecution stepExecution)
Creates StepExecutionType from StepExecution.

Parameters:
stepExecution - the step execution
Returns:
the step execution type
See Also:
convertStepExecutionType(StepExecution, JobExecution)

convertStepExecutionType

public static StepExecutionType convertStepExecutionType(org.springframework.batch.core.StepExecution stepExecution,
                                                         org.springframework.batch.core.JobExecution jobExecution)
Creates StepExecutionType from StepExecution. Second argument JobExecution is only used as a back reference to prevent never ending loop for serialization logic due to references between StepExecution and JobExecution.

Parameters:
stepExecution - the step execution
jobExecution - the job execution
Returns:
the step execution type

convertExecutionContext

public static ExecutionContextType convertExecutionContext(org.springframework.batch.item.ExecutionContext executionContext)
Converts a ExecutionContext to ExecutionContextType.

Parameters:
executionContext - the execution context
Returns:
converted execution context type

convertExecutionContextType

public static org.springframework.batch.item.ExecutionContext convertExecutionContextType(ExecutionContextType executionContextType)
Converts a ExecutionContextType to ExecutionContext.

Parameters:
executionContextType - the execution context type
Returns:
converted execution context

convertStepExecutionType

public static org.springframework.batch.core.StepExecution convertStepExecutionType(StepExecutionType type)
Converts a StepExecutionType to StepExecution.

Parameters:
type - the step execution type
Returns:
converted step execution

convertJobExecutionType

public static JobExecutionType convertJobExecutionType(org.springframework.batch.core.JobExecution jobExecution)
Creates JobExecutionType from JobExecution.

Parameters:
jobExecution - the job execution
Returns:
the job execution type
See Also:
convertJobExecutionType(JobExecution, StepExecution)

convertJobExecutionType

public static JobExecutionType convertJobExecutionType(org.springframework.batch.core.JobExecution jobExecution,
                                                       org.springframework.batch.core.StepExecution stepExecution)
Creates JobExecutionType from JobExecution. Second argument StepExecution is only used as a back reference to prevent never ending loop for serialization logic due to references between StepExecution and JobExecution.

Parameters:
jobExecution - the job execution
stepExecution - the step execution
Returns:
the job execution type

convertJobExecutionType

public static org.springframework.batch.core.JobExecution convertJobExecutionType(JobExecutionType type)
Converts a JobExecutionType to JobExecution.

Parameters:
type - the job execution type
Returns:
converted job execution

convertJobInstanceType

public static JobInstanceType convertJobInstanceType(org.springframework.batch.core.JobInstance jobInstance)
Converts a JobInstance to JobInstanceType.

Parameters:
jobInstance - the job instance
Returns:
converted job instance type

convertJobInstanceType

public static org.springframework.batch.core.JobInstance convertJobInstanceType(JobInstanceType type)
Converts a JobInstanceType to JobInstance.

Parameters:
type - the job instance type
Returns:
converted job instance

convertJobParameters

public static JobParametersType convertJobParameters(org.springframework.batch.core.JobParameters jobParameters)
Converts a JobParameters to JobParametersType.

Parameters:
jobParameters - the job parameters
Returns:
converted job parameters type

convertJobParametersType

public static org.springframework.batch.core.JobParameters convertJobParametersType(JobParametersType type)
Converts a JobParametersType to JobParameters.

Parameters:
type - the job parameters type
Returns:
converted job parameters

buildCreateJobInstanceReq

public static CreateJobInstanceReq buildCreateJobInstanceReq(java.lang.String jobName,
                                                             org.springframework.batch.core.JobParameters jobParameters)
Builds request for creating a job instance.

Parameters:
jobName - the job name
jobParameters - the job parameters
Returns:
the CreateJobInstanceReq request

buildGetJobInstanceReq

public static GetJobInstanceReq buildGetJobInstanceReq(java.lang.String jobName,
                                                       org.springframework.batch.core.JobParameters jobParameters)
Builds request for getting a job instance.

Parameters:
jobName - the job name
jobParameters - the job parameters
Returns:
the GetJobInstanceReq request

buildGetJobInstanceByIdReq

public static GetJobInstanceByIdReq buildGetJobInstanceByIdReq(java.lang.Long id)
Builds request for getting a job instance by id.

Parameters:
id - the job instance id
Returns:
the GetJobInstanceByIdReq request

buildGetJobInstancesReq

public static GetJobInstancesReq buildGetJobInstancesReq(java.lang.String jobName,
                                                         int start,
                                                         int count)
Builds request for getting a job instance by its name and paging info.

Parameters:
jobName - the job name
start - index where to start
count - max number of entries to request
Returns:
the GetJobInstancesReq request

buildGetLastJobExecutionReq

public static GetLastJobExecutionReq buildGetLastJobExecutionReq(org.springframework.batch.core.JobInstance jobInstance)
Builds request for getting a last execution by a job instance.

Parameters:
jobInstance - the job instance
Returns:
the GetLastJobExecutionReq request

buildFindJobExecutionsReq

public static FindJobExecutionsReq buildFindJobExecutionsReq(org.springframework.batch.core.JobInstance jobInstance)
Builds request for finding a job execution by a job instance.

Parameters:
jobInstance - the job instance
Returns:
the FindJobExecutionsReq request

buildFindRunningJobExecutionsReq

public static FindRunningJobExecutionsReq buildFindRunningJobExecutionsReq(java.lang.String jobName)
Builds request for finding a job executions by a job name.

Parameters:
jobName - the job name
Returns:
the FindRunningJobExecutionsReq request

buildGetJobExecutionReq

public static GetJobExecutionReq buildGetJobExecutionReq(java.lang.Long executionId)
Builds request for getting a job execution by its execution id.

Parameters:
executionId - the execution id
Returns:
the GetJobExecutionReq request

buildGetJobNamesReq

public static GetJobNamesReq buildGetJobNamesReq()
Builds request for getting a job names.

Returns:
the GetJobNamesReq request

Spring for Apache Hadoop