Package org.apache.nutch.segment
Class SegmentReader
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.nutch.segment.SegmentReader
- All Implemented Interfaces:
Configurable,Tool
Dump the content of a segment.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classImplements a text output format -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidstatic CharsetgetCharset(Metadata parseMeta) Try to get HTML encoding from parse metadata.voidgetStats(Path segment, SegmentReader.SegmentReaderStats stats) voidstatic voidintMethods inherited from class org.apache.hadoop.conf.Configured
getConf, setConfMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
-
Constructor Details
-
SegmentReader
public SegmentReader()
-
-
Method Details
-
dump
public void dump(Path segment, Path output) throws IOException, InterruptedException, ClassNotFoundException -
get
public void get(Path segment, Text key, Writer writer, Map<String, List<Writable>> results) throws Exception- Throws:
Exception
-
getCharset
Try to get HTML encoding from parse metadata. TryNutch.CHAR_ENCODING_FOR_CONVERSION, thenHttpHeaders.CONTENT_ENCODINGthen fall back toStandardCharsets.UTF_8 -
list
- Throws:
Exception
-
getStats
- Throws:
Exception
-
run
-
main
- Throws:
Exception
-