org.apache.nutch.db
Class DBKeyDivision
java.lang.Object
org.apache.nutch.db.DBKeyDivision
- public class DBKeyDivision
- extends Object
DBKeyDivision exists for other DB classes to
figure out how to find the right distributed-DB
section.
- Author:
- Mike Cafarella
Method Summary |
static int |
findMD5Section(MD5Hash md5,
int numSections)
Find the right section index for the given MD5, and the number of
sections in the db overall. |
static int |
findURLSection(String url,
int numSections)
Find the right section index for the given URL, and the number of
sections in the db overall. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
URL_KEYSPACE_DIVIDERS
public static String[] URL_KEYSPACE_DIVIDERS
MD5_KEYSPACE_DIVIDERS
public static MD5Hash[] MD5_KEYSPACE_DIVIDERS
MAX_SECTIONS
public static int MAX_SECTIONS
DBKeyDivision
public DBKeyDivision()
findURLSection
public static int findURLSection(String url,
int numSections)
- Find the right section index for the given URL, and the number of
sections in the db overall.
findMD5Section
public static int findMD5Section(MD5Hash md5,
int numSections)
- Find the right section index for the given MD5, and the number of
sections in the db overall.
Copyright © 2006 The Apache Software Foundation