|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.nutch.segment.SegmentPart
public class SegmentPart
Utility class for handling information about segment parts.
Field Summary | |
---|---|
String |
partName
Name of the segment part (ie. |
String |
segmentName
Name of the segment (just the last path component). |
Constructor Summary | |
---|---|
SegmentPart()
|
|
SegmentPart(String segmentName,
String partName)
|
Method Summary | |
---|---|
static SegmentPart |
get(FileSplit split)
Create SegmentPart from a FileSplit. |
static SegmentPart |
get(String path)
Create SegmentPart from a full path of a location inside any segment part. |
static SegmentPart |
parse(String string)
Create SegmentPart from a String in format "segmentName/partName". |
String |
toString()
Return a String representation of this class, in the form "segmentName/partName". |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public String segmentName
public String partName
Constructor Detail |
---|
public SegmentPart()
public SegmentPart(String segmentName, String partName)
Method Detail |
---|
public String toString()
toString
in class Object
public static SegmentPart get(FileSplit split) throws IOException
split
-
SegmentPart
resultant from a
FileSplit
.
Exception
IOException
public static SegmentPart get(String path) throws IOException
path
- full path into a segment part (may include "part-xxxxx" components)
IOException
- if any required path components are missing.public static SegmentPart parse(String string) throws IOException
string
- input String
IOException
- if "/" is missing.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |