public class AbstractMapReduceTests extends AbstractHadoopClusterTests
applicationContext, configuration, hadoopCluster
Constructor and Description |
---|
AbstractMapReduceTests() |
Modifier and Type | Method and Description |
---|---|
protected JobUtils.JobStatus |
findStatus(org.apache.hadoop.mapreduce.Job job)
Find job status.
|
protected org.apache.hadoop.fs.Path[] |
getOutputFilePaths(org.apache.hadoop.fs.Path outputDirectory)
Finds an array of output file
Path s resulted as
mapreduce job run. |
protected org.apache.hadoop.fs.Path[] |
getOutputFilePaths(java.lang.String outputDirectory)
Finds an array of output file
Path s resulted as
mapreduce job run. |
protected JobUtils.JobStatus |
waitFinishedStatus(org.apache.hadoop.mapreduce.Job job,
long timeout,
java.util.concurrent.TimeUnit unit)
Wait finished status.
|
protected JobUtils.JobStatus |
waitStatus(org.apache.hadoop.mapreduce.Job job,
long timeout,
java.util.concurrent.TimeUnit unit,
JobUtils.JobStatus... jobStatuses)
Waits state.
|
getApplicationContext, getConfiguration, getFileSystem, getHadoopCluster, setApplicationContext, setConfiguration, setHadoopCluster
protected org.apache.hadoop.fs.Path[] getOutputFilePaths(java.lang.String outputDirectory) throws java.io.FileNotFoundException, java.io.IOException
Path
s 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 org.apache.hadoop.fs.Path[] getOutputFilePaths(org.apache.hadoop.fs.Path outputDirectory) throws java.io.FileNotFoundException, java.io.IOException
Path
s 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 JobUtils.JobStatus waitFinishedStatus(org.apache.hadoop.mapreduce.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 JobUtils.JobStatus waitStatus(org.apache.hadoop.mapreduce.Job job, long timeout, java.util.concurrent.TimeUnit unit, 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 JobUtils.JobStatus findStatus(org.apache.hadoop.mapreduce.Job job)
job
- the job