|
||||||||||
| 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
com.sun.labs.minion.indexer.partition.MemoryPartition
public abstract class MemoryPartition
A class for holding a partition in memory while it is under construction. A partition consists of four files:
DiskPartition,
MemoryDictionary,
MemoryFieldStore| Field Summary | |
|---|---|
protected DocOccurrence |
ddo
An occurrence that we can use to add data to postings for the document dictionary entries. |
protected DelMap |
del
A deleted map to use when the same document comes along in the same partition. |
protected java.util.List<java.lang.Integer> |
deleted
|
protected MemoryDictionary |
docDict
The document dictionary. |
protected DocKeyEntry |
dockey
The key for the document that we're currently processing, from the document dictionary. |
protected static java.lang.String |
logTag
The tag for this module. |
protected MemoryDictionary |
mainDict
The main dictionary. |
protected java.lang.String |
name
|
protected int |
nWords
The number of words in the current document. |
protected long |
postBytes
The number of bytes of postings data we've encoded so far. |
| Fields inherited from class com.sun.labs.minion.indexer.partition.Partition |
|---|
DICT_OFFSETS_SIZE, docDictFactory, entryClass, entryName, indexConfig, mainDictFactory, mainDictFile, mainPostFiles, manager, maxID, nEntries, partNumber, PROP_DOC_DICT_FACTORY, PROP_INDEX_CONFIG, PROP_MAIN_DICT_FACTORY, PROP_PARTITION_MANAGER, stats |
| Constructor Summary | |
|---|---|
MemoryPartition()
|
|
| Method Summary | |
|---|---|
protected int |
dump()
Dumps the current partition. |
void |
dump(IndexConfig iC)
Tells a stage that its data must be dumped to the index. |
protected void |
dumpCustom(Entry[] sorted)
Performs any custom data dump required in a subclass. |
DocKeyEntry |
getDocumentTerm(java.lang.String key)
Gets an entry from the in-memory document dictionary. |
void |
newProperties(com.sun.labs.util.props.PropertySheet ps)
|
void |
shutdown(IndexConfig iC)
Shut down the indexing stage, dumping any collected data and reporting on our final progress. |
| Methods inherited from class com.sun.labs.minion.indexer.partition.Partition |
|---|
compareTo, getAllFiles, getAllFiles, getDocFiles, getDocFiles, getIndexConfig, getMainFiles, getMainFiles, getManager, getName, getNDocs, getNumPostingsChannels, getPartitionNumber, getQueryConfig, getStats |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected MemoryDictionary mainDict
protected MemoryDictionary docDict
protected DocKeyEntry dockey
protected DocOccurrence ddo
protected DelMap del
protected long postBytes
protected int nWords
protected static java.lang.String logTag
protected java.lang.String name
protected java.util.List<java.lang.Integer> deleted
| Constructor Detail |
|---|
public MemoryPartition()
| Method Detail |
|---|
protected int dump()
throws java.io.IOException
java.io.IOException - if there is any error writing the partition
data to diskpublic DocKeyEntry getDocumentTerm(java.lang.String key)
key - the key of the document that we want the entry for
null if this key
doesn't occur in this partition.
protected void dumpCustom(Entry[] sorted)
throws java.io.IOException
sorted - the sorted array of main dictionary entries, which might
be useful in a subclass
java.io.IOException - if there is any error writing the data
to diskpublic void dump(IndexConfig iC)
iC - The configuration for the index, which can be used to
retrieve things like the index directory.public void shutdown(IndexConfig iC)
iC - The configuration for the index, which can be used to
retrieve things like the index directory.
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.ConfigurablenewProperties in class Partitioncom.sun.labs.util.props.PropertyException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||