public class ParseSegment extends NutchTool implements Tool, Mapper<WritableComparable<?>,Content,Text,ParseImpl>, Reducer<Text,Writable,Text,Writable>
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SKIP_TRUNCATED |
currentJob, currentJobNum, numJobs, results, status| Constructor and Description |
|---|
ParseSegment() |
ParseSegment(Configuration conf) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
configure(JobConf job) |
static boolean |
isTruncated(Content content)
Checks if the page's content is truncated.
|
static void |
main(java.lang.String[] args) |
void |
map(WritableComparable<?> key,
Content content,
OutputCollector<Text,ParseImpl> output,
Reporter reporter) |
void |
parse(Path segment) |
void |
reduce(Text key,
java.util.Iterator<Writable> values,
OutputCollector<Text,Writable> output,
Reporter reporter) |
java.util.Map<java.lang.String,java.lang.Object> |
run(java.util.Map<java.lang.String,java.lang.Object> args,
java.lang.String crawlId)
Runs the tool, using a map of arguments.
|
int |
run(java.lang.String[] args) |
getProgress, getStatus, killJob, stopJobgetConf, setConfclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConf, setConfpublic static final java.lang.String SKIP_TRUNCATED
public ParseSegment()
public ParseSegment(Configuration conf)
public void configure(JobConf job)
configure in interface JobConfigurablepublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablepublic void map(WritableComparable<?> key, Content content, OutputCollector<Text,ParseImpl> output, Reporter reporter) throws java.io.IOException
public static boolean isTruncated(Content content)
content - true. When it is not, or when
it could be determined, false.public void reduce(Text key, java.util.Iterator<Writable> values, OutputCollector<Text,Writable> output, Reporter reporter) throws java.io.IOException
public void parse(Path segment) throws java.io.IOException
java.io.IOExceptionpublic static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exceptionpublic int run(java.lang.String[] args)
throws java.lang.Exception
public java.util.Map<java.lang.String,java.lang.Object> run(java.util.Map<java.lang.String,java.lang.Object> args,
java.lang.String crawlId)
throws java.lang.Exception
NutchToolCopyright © 2017 The Apache Software Foundation