org.apache.nutch.segment
Class SegmentReader
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.nutch.segment.SegmentReader
- All Implemented Interfaces:
- Closeable, Configurable, JobConfigurable, Reducer<Text,NutchWritable,Text,Text>
public class SegmentReader
- extends Configured
- implements Reducer<Text,NutchWritable,Text,Text>
Dump the content of a segment.
Field Summary |
static org.slf4j.Logger |
LOG
|
Method Summary |
void |
close()
|
void |
configure(JobConf job)
|
void |
dump(Path segment,
Path output)
|
void |
get(Path segment,
Text key,
Writer writer,
Map<String,List<Writable>> results)
|
void |
getStats(Path segment,
SegmentReader.SegmentReaderStats stats)
|
void |
list(List<Path> dirs,
Writer writer)
|
static void |
main(String[] args)
|
void |
reduce(Text key,
Iterator<NutchWritable> values,
OutputCollector<Text,Text> output,
Reporter reporter)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
public static final org.slf4j.Logger LOG
SegmentReader
public SegmentReader()
SegmentReader
public SegmentReader(Configuration conf,
boolean co,
boolean fe,
boolean ge,
boolean pa,
boolean pd,
boolean pt)
configure
public void configure(JobConf job)
- Specified by:
configure
in interface JobConfigurable
close
public void close()
- Specified by:
close
in interface Closeable
reduce
public void reduce(Text key,
Iterator<NutchWritable> values,
OutputCollector<Text,Text> output,
Reporter reporter)
throws IOException
- Specified by:
reduce
in interface Reducer<Text,NutchWritable,Text,Text>
- Throws:
IOException
dump
public void dump(Path segment,
Path output)
throws IOException
- Throws:
IOException
get
public void get(Path segment,
Text key,
Writer writer,
Map<String,List<Writable>> results)
throws Exception
- Throws:
Exception
list
public void list(List<Path> dirs,
Writer writer)
throws Exception
- Throws:
Exception
getStats
public void getStats(Path segment,
SegmentReader.SegmentReaderStats stats)
throws Exception
- Throws:
Exception
main
public static void main(String[] args)
throws Exception
- Throws:
Exception
Copyright © 2011 The Apache Software Foundation