public class ArcSegmentCreator extends Configured implements Tool
The ArcSegmentCreator is a replacement for fetcher that will
take arc files as input and produce a nutch segment as output.
Arc files are tars of compressed gzips which are produced by both the internet archive project and the grub distributed crawler project.
| Modifier and Type | Class and Description |
|---|---|
static class |
ArcSegmentCreator.ArcSegmentCreatorMapper |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
URL_VERSION |
| Constructor and Description |
|---|
ArcSegmentCreator() |
ArcSegmentCreator(Configuration conf)
Constructor that sets the job configuration.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
createSegments(Path arcFiles,
Path segmentsOutDir)
Creates the arc files to segments job.
|
static java.lang.String |
generateSegmentName()
Generates a random name for the segments.
|
static void |
main(java.lang.String[] args) |
int |
run(java.lang.String[] args) |
getConf, setConfclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConf, setConfpublic static final java.lang.String URL_VERSION
public ArcSegmentCreator()
public ArcSegmentCreator(Configuration conf)
Constructor that sets the job configuration.
conf - public static java.lang.String generateSegmentName()
public void close()
public void createSegments(Path arcFiles, Path segmentsOutDir) throws java.io.IOException, java.lang.InterruptedException, java.lang.ClassNotFoundException
Creates the arc files to segments job.
arcFiles - The path to the directory holding the arc filessegmentsOutDir - The output directory for writing the segmentsjava.io.IOException - If an IO error occurs while running the job.java.lang.InterruptedExceptionjava.lang.ClassNotFoundExceptionpublic static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.ExceptionCopyright © 2019 The Apache Software Foundation