|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.nutch.db.DBSectionReader
DBSectionReader reads a discrete portion of a WebDB. It may implement its methods with either a local MapFile.Reader object or (eventually) a remote- machine network interface. For the moment, we do only the MapFile.Reader implementation (much of the code for this was moved from the earlier pre-distributed version of WebDBReadaer).
Constructor Summary | |
DBSectionReader(NutchFileSystem nfs,
File sectionFile,
WritableComparator comparator)
Right now we assume we're getting a File that is a MapFile.Reader directory. |
Method Summary | |
void |
close()
|
Vector |
getLinks(MD5Hash md5)
Grab all the links from the given MD5 hash. |
Vector |
getLinks(UTF8 url)
Get all the hyperlinks that link TO the indicated URL. |
Page |
getPage(UTF8 url,
Page p)
Fetch a Page with the given URL, and fill it into the pre-allocated Page 'p'. |
Vector |
getPages(MD5Hash md5)
Get Pages from the db according to their content hash. |
Enumeration |
links()
Return all the links, by target URL |
boolean |
pageExists(MD5Hash md5)
Test whether a certain piece of content is in the db, but don't bother returning it. |
Enumeration |
pages()
Iterate through all the Pages, sorted by URL |
Enumeration |
pagesByMD5()
Iterate through all the Pages, sorted by MD5 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DBSectionReader(NutchFileSystem nfs, File sectionFile, WritableComparator comparator) throws IOException
Method Detail |
public Page getPage(UTF8 url, Page p) throws IOException
IOException
public Vector getPages(MD5Hash md5) throws IOException
IOException
public boolean pageExists(MD5Hash md5) throws IOException
IOException
public Enumeration pages() throws IOException
IOException
public Enumeration pagesByMD5() throws IOException
IOException
public Vector getLinks(UTF8 url) throws IOException
IOException
public Vector getLinks(MD5Hash md5) throws IOException
IOException
public Enumeration links() throws IOException
IOException
public void close() throws IOException
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |