Class MetadataCDXExtractionStrategy
- java.lang.Object
-
- dk.netarkivet.viewerproxy.webinterface.hadoop.MetadataCDXExtractionStrategy
-
- All Implemented Interfaces:
HadoopJobStrategy
public class MetadataCDXExtractionStrategy extends Object implements HadoopJobStrategy
Strategy to extract CDX lines from metadata files. This type of job is the Hadoop counterpart to runningArchiveExtractCDXJob
.
-
-
Constructor Summary
Constructors Constructor Description MetadataCDXExtractionStrategy(long jobID, org.apache.hadoop.fs.FileSystem fileSystem)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete 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
public int runJob(org.apache.hadoop.fs.Path jobInputFile, org.apache.hadoop.fs.Path jobOutputDir)
Description copied from interface:HadoopJobStrategy
Runs a Hadoop job (HadoopJobTool) according to the specification of the used strategy.- Specified by:
runJob
in interfaceHadoopJobStrategy
- 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
public org.apache.hadoop.fs.Path createJobInputFile(UUID uuid)
Description copied from interface:HadoopJobStrategy
Create the job input file with name from a uuid.- Specified by:
createJobInputFile
in interfaceHadoopJobStrategy
- Parameters:
uuid
- The UUID to create a unique name from.- Returns:
- Path specifying where the input file is located.
-
createJobOutputDir
public org.apache.hadoop.fs.Path createJobOutputDir(UUID uuid)
Description copied from interface:HadoopJobStrategy
Create the job output directory with name from a uuid.- Specified by:
createJobOutputDir
in interfaceHadoopJobStrategy
- Parameters:
uuid
- The UUID to create a unique name from.- Returns:
- Path specifying where the output directory is located.
-
getJobType
public String getJobType()
Description copied from interface:HadoopJobStrategy
Return a string specifying which kind of job is being run.- Specified by:
getJobType
in interfaceHadoopJobStrategy
- Returns:
- String specifying the job's type.
-
-