org.apache.nutch.db
Class DBKeyDivision

java.lang.Object
  extended byorg.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

Field Summary
static int MAX_SECTIONS
           
static MD5Hash[] MD5_KEYSPACE_DIVIDERS
           
static String[] URL_KEYSPACE_DIVIDERS
           
 
Constructor Summary
DBKeyDivision()
           
 
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
 

Field Detail

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
Constructor Detail

DBKeyDivision

public DBKeyDivision()
Method Detail

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