Package org.apache.nutch.hostdb
Class HostDatum
- java.lang.Object
-
- org.apache.nutch.hostdb.HostDatum
-
-
Field Summary
Fields Modifier and Type Field Description protected long
connectionFailures
protected long
dnsFailures
protected static byte[]
emptyMetaDataWritableSerialized
protected long
failures
protected long
fetched
protected long
gone
protected String
homepageUrl
protected Date
lastCheck
protected MapWritable
metaData
protected long
notModified
protected long
redirPerm
protected long
redirTemp
protected float
score
protected long
unfetched
-
Method Summary
-
-
-
Field Detail
-
failures
protected long failures
-
score
protected float score
-
lastCheck
protected Date lastCheck
-
homepageUrl
protected String homepageUrl
-
metaData
protected MapWritable metaData
-
emptyMetaDataWritableSerialized
protected static final byte[] emptyMetaDataWritableSerialized
-
dnsFailures
protected long dnsFailures
-
connectionFailures
protected long connectionFailures
-
unfetched
protected long unfetched
-
fetched
protected long fetched
-
notModified
protected long notModified
-
redirTemp
protected long redirTemp
-
redirPerm
protected long redirPerm
-
gone
protected long gone
-
-
Method Detail
-
resetFailures
public void resetFailures()
-
setDnsFailures
public void setDnsFailures(Long dnsFailures)
-
setConnectionFailures
public void setConnectionFailures(Long connectionFailures)
-
incDnsFailures
public void incDnsFailures()
-
incConnectionFailures
public void incConnectionFailures()
-
numFailures
public Long numFailures()
-
getDnsFailures
public Long getDnsFailures()
-
getConnectionFailures
public Long getConnectionFailures()
-
setScore
public void setScore(float score)
-
setLastCheck
public void setLastCheck()
-
setLastCheck
public void setLastCheck(Date date)
-
isEmpty
public boolean isEmpty()
-
getScore
public float getScore()
-
numRecords
public Long numRecords()
-
getLastCheck
public Date getLastCheck()
-
hasHomepageUrl
public boolean hasHomepageUrl()
-
getHomepageUrl
public String getHomepageUrl()
-
setHomepageUrl
public void setHomepageUrl(String homepageUrl)
-
setUnfetched
public void setUnfetched(long val)
-
getUnfetched
public long getUnfetched()
-
setFetched
public void setFetched(long val)
-
getFetched
public long getFetched()
-
setNotModified
public void setNotModified(long val)
-
getNotModified
public long getNotModified()
-
setRedirTemp
public void setRedirTemp(long val)
-
getRedirTemp
public long getRedirTemp()
-
setRedirPerm
public void setRedirPerm(long val)
-
getRedirPerm
public long getRedirPerm()
-
setGone
public void setGone(long val)
-
getGone
public long getGone()
-
resetStatistics
public void resetStatistics()
-
setMetaData
public void setMetaData(MapWritable mapWritable)
-
putAllMetaData
public void putAllMetaData(HostDatum other)
Add all metadata from other HostDatum to this HostDatum.- Parameters:
other
- HostDatum
-
getMetaData
public MapWritable getMetaData()
Get Host metadata.- Returns:
- a
MapWritable
if it was set or read inreadFields(DataInput)
, OR returns empty map in caseHostDatum
was freshly created (lazily instantiated).
-
hasMetaData
public boolean hasMetaData()
- Returns:
- true if host has (non-empty) metadata
-
clone
public Object clone() throws CloneNotSupportedException
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
readFields
public void readFields(DataInput in) throws IOException
- Specified by:
readFields
in interfaceWritable
- Throws:
IOException
-
write
public void write(DataOutput out) throws IOException
- Specified by:
write
in interfaceWritable
- Throws:
IOException
-
-