Package org.apache.nutch.segment
Class SegmentPart
java.lang.Object
org.apache.nutch.segment.SegmentPart
Utility class for handling information about segment parts.
- Author:
- Andrzej Bialecki
-
Field Summary
FieldsModifier and TypeFieldDescriptionName of the segment part (ie.Name of the segment (just the last path component). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SegmentPartCreate SegmentPart from a full path of a location inside any segment part.static SegmentPartCreate SegmentPart from a FileSplit.static SegmentPartCreate SegmentPart from a String in format "segmentName/partName".toString()Return a String representation of this class, in the form "segmentName/partName".
-
Field Details
-
segmentName
Name of the segment (just the last path component). -
partName
Name of the segment part (ie. one of subdirectories inside a segment).
-
-
Constructor Details
-
SegmentPart
public SegmentPart() -
SegmentPart
-
-
Method Details
-
toString
Return a String representation of this class, in the form "segmentName/partName". -
get
Create SegmentPart from a FileSplit.- Parameters:
split- aFileSplitsegment part- Returns:
- a
SegmentPartresultant from aFileSplit. - Throws:
IOException- if there is a fatal error locating the split
-
get
Create SegmentPart from a full path of a location inside any segment part.- Parameters:
path- full path into a segment part (may include "part-xxxxx" components)- Returns:
- SegmentPart instance describing this part.
- Throws:
IOException- if any required path components are missing.
-
parse
Create SegmentPart from a String in format "segmentName/partName".- Parameters:
string- input String- Returns:
- parsed instance of SegmentPart
- Throws:
IOException- if "/" is missing.
-