|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.nutch.crawl.UrlWithScore
public final class UrlWithScore
A writable comparable container for an url with score. Provides a
UrlWithScore.UrlOnlyPartitioner
and RawComparator
implementations for easy
integration with jobs.
Nested Class Summary | |
---|---|
static class |
UrlWithScore.UrlOnlyPartitioner
A partitioner by {url}. |
static class |
UrlWithScore.UrlScoreComparator
Compares by {url,score}. |
Constructor Summary | |
---|---|
UrlWithScore()
Creates instance with empty url and zero score. |
|
UrlWithScore(String url,
float score)
Creates instance with provided non-writable types. |
|
UrlWithScore(Text url,
FloatWritable score)
Creates instance with provided writables. |
Method Summary | |
---|---|
int |
compareTo(UrlWithScore other)
|
FloatWritable |
getScore()
|
Text |
getUrl()
|
void |
readFields(DataInput in)
|
void |
setScore(float score)
|
void |
setScore(FloatWritable score)
|
void |
setUrl(String url)
|
void |
setUrl(Text url)
|
String |
toString()
|
void |
write(DataOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public UrlWithScore()
public UrlWithScore(Text url, FloatWritable score)
url
- score
- public UrlWithScore(String url, float score)
url
- score
- Method Detail |
---|
public void write(DataOutput out) throws IOException
write
in interface Writable
IOException
public void readFields(DataInput in) throws IOException
readFields
in interface Writable
IOException
public Text getUrl()
public void setUrl(Text url)
public void setUrl(String url)
public FloatWritable getScore()
public void setScore(FloatWritable score)
public void setScore(float score)
public int compareTo(UrlWithScore other)
compareTo
in interface Comparable<UrlWithScore>
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |