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 AddWithStepExecutionReq buildAddWithStepExecutionReq(org.springframework.batch.core.StepExecution stepExecution)
           
static CreateJobExecutionReq buildCreateJobExecutionReq(java.lang.String jobName, org.springframework.batch.core.JobParameters jobParameters)
           
static CreateJobExecutionWithJobInstanceReq buildCreateJobExecutionWithJobInstanceReq(org.springframework.batch.core.JobInstance jobInstance, org.springframework.batch.core.JobParameters jobParameters, java.lang.String jobConfigurationLocation)
           
static CreateJobInstanceReq buildCreateJobInstanceReq(java.lang.String jobName, org.springframework.batch.core.JobParameters jobParameters)
           
static FindRunningJobExecutionsReq buildFindRunningJobExecutionsReq(java.lang.String jobName)
           
static GetJobExecutionReq buildGetJobExecutionReq(java.lang.Long executionId)
           
static GetJobExecutionsReq buildGetJobExecutionsReq(org.springframework.batch.core.JobInstance jobInstance)
           
static GetJobInstanceCountReq buildGetJobInstanceCountReq(java.lang.String jobName)
           
static GetJobInstanceReq buildGetJobInstanceReq(java.lang.Long instanceId)
           
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()
           
static GetLastJobExecutionReq buildGetLastJobExecutionReq(java.lang.String jobName, org.springframework.batch.core.JobParameters jobParameters)
           
static GetLastStepExecutionReq buildGetLastStepExecutionReq(org.springframework.batch.core.JobInstance jobInstance, java.lang.String stepName)
           
static GetStepExecutionCountReq buildGetStepExecutionCountReq(org.springframework.batch.core.JobInstance jobInstance, java.lang.String stepName)
           
static GetStepExecutionReq buildGetStepExecutionReq(java.lang.Long jobExecutionId, java.lang.Long stepExecutionId)
           
static IsJobInstanceExistsReq buildIsJobInstanceExistsReq(java.lang.String jobName, org.springframework.batch.core.JobParameters jobParameters)
           
static UpdateWithJobExecutionReq buildSaveJobExecutionReq(org.springframework.batch.core.JobExecution jobExecution)
           
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 UpdateWithStepExecutionReq buildUpdateWithStepExecutionReq(org.springframework.batch.core.StepExecution stepExecution)
           
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

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

buildIsJobInstanceExistsReq

public static IsJobInstanceExistsReq buildIsJobInstanceExistsReq(java.lang.String jobName,
                                                                 org.springframework.batch.core.JobParameters jobParameters)

buildCreateJobExecutionReq

public static CreateJobExecutionReq buildCreateJobExecutionReq(java.lang.String jobName,
                                                               org.springframework.batch.core.JobParameters jobParameters)

buildCreateJobInstanceReq

public static CreateJobInstanceReq buildCreateJobInstanceReq(java.lang.String jobName,
                                                             org.springframework.batch.core.JobParameters jobParameters)

buildCreateJobExecutionWithJobInstanceReq

public static CreateJobExecutionWithJobInstanceReq buildCreateJobExecutionWithJobInstanceReq(org.springframework.batch.core.JobInstance jobInstance,
                                                                                             org.springframework.batch.core.JobParameters jobParameters,
                                                                                             java.lang.String jobConfigurationLocation)

buildSaveJobExecutionReq

public static UpdateWithJobExecutionReq buildSaveJobExecutionReq(org.springframework.batch.core.JobExecution jobExecution)

buildAddWithStepExecutionReq

public static AddWithStepExecutionReq buildAddWithStepExecutionReq(org.springframework.batch.core.StepExecution stepExecution)

buildGetStepExecutionCountReq

public static GetStepExecutionCountReq buildGetStepExecutionCountReq(org.springframework.batch.core.JobInstance jobInstance,
                                                                     java.lang.String stepName)

buildGetJobInstanceCountReq

public static GetJobInstanceCountReq buildGetJobInstanceCountReq(java.lang.String jobName)

buildGetLastStepExecutionReq

public static GetLastStepExecutionReq buildGetLastStepExecutionReq(org.springframework.batch.core.JobInstance jobInstance,
                                                                   java.lang.String stepName)

buildUpdateWithStepExecutionReq

public static UpdateWithStepExecutionReq buildUpdateWithStepExecutionReq(org.springframework.batch.core.StepExecution stepExecution)

buildGetLastJobExecutionReq

public static GetLastJobExecutionReq buildGetLastJobExecutionReq(java.lang.String jobName,
                                                                 org.springframework.batch.core.JobParameters jobParameters)

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

buildGetJobInstanceReq

public static GetJobInstanceReq buildGetJobInstanceReq(java.lang.Long instanceId)

buildGetJobExecutionReq

public static GetJobExecutionReq buildGetJobExecutionReq(java.lang.Long executionId)

buildGetStepExecutionReq

public static GetStepExecutionReq buildGetStepExecutionReq(java.lang.Long jobExecutionId,
                                                           java.lang.Long stepExecutionId)

buildGetJobExecutionsReq

public static GetJobExecutionsReq buildGetJobExecutionsReq(org.springframework.batch.core.JobInstance jobInstance)

buildFindRunningJobExecutionsReq

public static FindRunningJobExecutionsReq buildFindRunningJobExecutionsReq(java.lang.String jobName)

buildGetJobNamesReq

public static GetJobNamesReq buildGetJobNamesReq()

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

Spring for Apache Hadoop