public class AbstractMapReduceTests extends AbstractHadoopClusterTests
applicationContext, configuration, hadoopCluster| Constructor and Description |
|---|
AbstractMapReduceTests() |
| Modifier and Type | Method and Description |
|---|---|
protected org.springframework.data.hadoop.mapreduce.JobUtils.JobStatus |
findStatus(Job job)
Find job status.
|
protected Path[] |
getOutputFilePaths(Path outputDirectory)
Finds an array of output file
Paths resulted as
mapreduce job run. |
protected Path[] |
getOutputFilePaths(java.lang.String outputDirectory)
Finds an array of output file
Paths resulted as
mapreduce job run. |
protected org.springframework.data.hadoop.mapreduce.JobUtils.JobStatus |
waitFinishedStatus(Job job,
long timeout,
java.util.concurrent.TimeUnit unit)
Wait finished status.
|
protected org.springframework.data.hadoop.mapreduce.JobUtils.JobStatus |
waitStatus(Job job,
long timeout,
java.util.concurrent.TimeUnit unit,
org.springframework.data.hadoop.mapreduce.JobUtils.JobStatus... jobStatuses)
Waits state.
|
getApplicationContext, getConfiguration, getFileSystem, getHadoopCluster, setApplicationContext, setConfiguration, setHadoopClusterprotected Path[] getOutputFilePaths(java.lang.String outputDirectory) throws java.io.FileNotFoundException, java.io.IOException
Paths resulted as
mapreduce job run.outputDirectory - the path to jobs output directoryjava.io.FileNotFoundException - if given path was not foundjava.io.IOException - if general access error occuredgetOutputFilePaths(Path)protected Path[] getOutputFilePaths(Path outputDirectory) throws java.io.FileNotFoundException, java.io.IOException
Paths resulted as
mapreduce job run.outputDirectory - the path to jobs output directoryjava.io.FileNotFoundException - if given path was not foundjava.io.IOException - if general access error occuredprotected org.springframework.data.hadoop.mapreduce.JobUtils.JobStatus waitFinishedStatus(Job job, long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.Exception
JobStatus.SUCCEEDED, JobStatus.FAILED or JobStatus.KILLED.job - the jobtimeout - the timeout for waitunit - the unit for timeoutjava.lang.Exception - if exception occurredprotected org.springframework.data.hadoop.mapreduce.JobUtils.JobStatus waitStatus(Job job, long timeout, java.util.concurrent.TimeUnit unit, org.springframework.data.hadoop.mapreduce.JobUtils.JobStatus... jobStatuses) throws java.lang.Exception
NULL
if something failed or final known state after the wait/poll operations.
Array of job statuses can be used to return immediately from wait
loop if state is matched.job - the jobtimeout - the timeout for waitunit - the unit for timeoutjobStatuses - the job statuses to waitjava.lang.Exception - if exception occurredprotected org.springframework.data.hadoop.mapreduce.JobUtils.JobStatus findStatus(Job job)
job - the job