Interface HadoopJobStrategy
-
- All Known Implementing Classes:
CrawlLogExtractionStrategy
,MetadataCDXExtractionStrategy
,MetadataExtractionStrategy
public interface HadoopJobStrategy
Interface for a HadoopJob's strategy of how to perform the job.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.apache.hadoop.fs.Path
createJobInputFile(UUID uuid)
Create the job input file with name from a uuid.org.apache.hadoop.fs.Path
createJobOutputDir(UUID uuid)
Create the job output directory with name from a uuid.String
getJobType()
Return a string specifying which kind of job is being run.int
runJob(org.apache.hadoop.fs.Path jobInputFile, org.apache.hadoop.fs.Path jobOutputDir)
Runs a Hadoop job (HadoopJobTool) according to the specification of the used strategy.
-
-
-
Method Detail
-
runJob
int runJob(org.apache.hadoop.fs.Path jobInputFile, org.apache.hadoop.fs.Path jobOutputDir)
Runs a Hadoop job (HadoopJobTool) according to the specification of the used strategy.- Parameters:
jobInputFile
- The Path specifying the job's input file.jobOutputDir
- The Path specifying the job's output directory.- Returns:
- An exit code for the job.
-
createJobInputFile
org.apache.hadoop.fs.Path createJobInputFile(UUID uuid)
Create the job input file with name from a uuid.- Parameters:
uuid
- The UUID to create a unique name from.- Returns:
- Path specifying where the input file is located.
-
createJobOutputDir
org.apache.hadoop.fs.Path createJobOutputDir(UUID uuid)
Create the job output directory with name from a uuid.- Parameters:
uuid
- The UUID to create a unique name from.- Returns:
- Path specifying where the output directory is located.
-
getJobType
String getJobType()
Return a string specifying which kind of job is being run.- Returns:
- String specifying the job's type.
-
-