|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.labs.minion.indexer.partition.Partition
public abstract class Partition
A superclass for Partitions. This is mostly used to
provide a bit of information that we want subclasses to have in common.
| Field Summary | |
|---|---|
protected static int |
DICT_OFFSETS_SIZE
The size, in bytes of the offsets that will be written for the dictionaries in the partition. |
protected DictionaryFactory |
docDictFactory
|
protected java.lang.Class |
entryClass
The class for the postings entries that we'll be building. |
protected java.lang.String |
entryName
The name of the entries. |
protected IndexConfig |
indexConfig
The configuration for this index. |
protected static java.lang.String |
logTag
The log tag. |
protected DictionaryFactory |
mainDictFactory
|
protected java.io.RandomAccessFile |
mainDictFile
The file for the main dictionaries. |
protected java.io.RandomAccessFile[] |
mainPostFiles
The streams for the postings. |
protected PartitionManager |
manager
The manager for this partition. |
protected int |
maxID
The maximum ID that was allocated in the partition. |
protected int |
nEntries
The number of actual entries in the partition. |
protected int |
partNumber
The number of this partition. |
static java.lang.String |
PROP_DOC_DICT_FACTORY
|
static java.lang.String |
PROP_INDEX_CONFIG
|
static java.lang.String |
PROP_MAIN_DICT_FACTORY
|
static java.lang.String |
PROP_PARTITION_MANAGER
|
protected PartitionStats |
stats
The statistics for this partition. |
| Constructor Summary | |
|---|---|
Partition()
|
|
| Method Summary | |
|---|---|
int |
compareTo(Partition p)
Compares two partitions by their partition numbers. |
protected java.io.File[] |
getAllFiles()
Gets all the files associated with a partition. |
protected static java.io.File[] |
getAllFiles(PartitionManager manager,
int partNumber)
Gets all the files associated with a partition. |
protected java.io.File[] |
getDocFiles()
Gets the files associated with the document keys for a partition. |
protected static java.io.File[] |
getDocFiles(PartitionManager manager,
int partNumber)
Gets the files associated with the document keys for a partition. |
IndexConfig |
getIndexConfig()
Gets a set of statistics for the collection holding this partition. |
protected java.io.File[] |
getMainFiles()
Gets the files associated with the main postings for a partition. |
protected static java.io.File[] |
getMainFiles(PartitionManager manager,
int partNumber)
Gets the files associated with the main postings for a partition. |
PartitionManager |
getManager()
Get the manager for this partition. |
java.lang.String |
getName()
|
abstract int |
getNDocs()
Gets the number of documents in this partition. |
int |
getNumPostingsChannels()
Gets the number of channels that we'll need to store postings for our main dictionary. |
int |
getPartitionNumber()
Get the number for this file. |
QueryConfig |
getQueryConfig()
Gets a set of statistics for the collection holding this partition. |
PartitionStats |
getStats()
Gets the statistics for this partition. |
void |
newProperties(com.sun.labs.util.props.PropertySheet ps)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected PartitionManager manager
protected PartitionStats stats
protected java.lang.String entryName
protected java.lang.Class entryClass
protected int partNumber
protected int maxID
protected int nEntries
protected java.io.RandomAccessFile mainDictFile
protected java.io.RandomAccessFile[] mainPostFiles
protected static final int DICT_OFFSETS_SIZE
protected static java.lang.String logTag
@ConfigComponent(type=DictionaryFactory.class) public static final java.lang.String PROP_DOC_DICT_FACTORY
@ConfigComponent(type=IndexConfig.class) public static final java.lang.String PROP_INDEX_CONFIG
@ConfigComponent(type=DictionaryFactory.class) public static final java.lang.String PROP_MAIN_DICT_FACTORY
@ConfigComponent(type=PartitionManager.class) public static final java.lang.String PROP_PARTITION_MANAGER
protected DictionaryFactory docDictFactory
protected DictionaryFactory mainDictFactory
protected IndexConfig indexConfig
| Constructor Detail |
|---|
public Partition()
| Method Detail |
|---|
public int getPartitionNumber()
public PartitionStats getStats()
public IndexConfig getIndexConfig()
public QueryConfig getQueryConfig()
public abstract int getNDocs()
public PartitionManager getManager()
public int getNumPostingsChannels()
protected java.io.File[] getMainFiles()
protected static java.io.File[] getMainFiles(PartitionManager manager,
int partNumber)
partNumber - the partition number for which we want the files.
protected java.io.File[] getDocFiles()
protected static java.io.File[] getDocFiles(PartitionManager manager,
int partNumber)
partNumber - the partition number for which we want the files.
protected java.io.File[] getAllFiles()
protected static java.io.File[] getAllFiles(PartitionManager manager,
int partNumber)
public int compareTo(Partition p)
compareTo in interface java.lang.Comparable<Partition>public java.lang.String getName()
public void newProperties(com.sun.labs.util.props.PropertySheet ps)
throws com.sun.labs.util.props.PropertyException
newProperties in interface com.sun.labs.util.props.Configurablecom.sun.labs.util.props.PropertyException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||