com.sun.labs.minion.classification
Class ClusterMemoryPartition
java.lang.Object
com.sun.labs.minion.indexer.partition.Partition
com.sun.labs.minion.indexer.partition.MemoryPartition
com.sun.labs.minion.classification.ClusterMemoryPartition
- All Implemented Interfaces:
- com.sun.labs.util.props.Component, com.sun.labs.util.props.Configurable, java.lang.Comparable<Partition>
public class ClusterMemoryPartition
- extends MemoryPartition
A memory partition that will hold classifier data.
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 |
Methods inherited from class com.sun.labs.minion.indexer.partition.Partition |
compareTo, getAllFiles, getAllFiles, getDocFiles, getDocFiles, getIndexConfig, getMainFiles, getMainFiles, getManager, getNumPostingsChannels, getPartitionNumber, getQueryConfig, getStats |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logTag
protected static java.lang.String logTag
- The tag for this module.
partitionManager
protected PartitionManager partitionManager
partClusters
protected int partClusters
- The number of clusters we've indexed into this partition
PROP_PART_MANAGER
@ConfigComponent(type=PartitionManager.class)
public static final java.lang.String PROP_PART_MANAGER
- See Also:
- Constant Field Values
ClusterMemoryPartition
public ClusterMemoryPartition()
- Constructs a ClusterMemoryPartition for general use.
getNDocs
public int getNDocs()
- Description copied from class:
Partition
- Gets the number of documents in this partition.
- Specified by:
getNDocs
in class Partition
addClusters
protected void addClusters(FeatureClusterSet clusters)
finishedAddingClusters
protected void finishedAddingClusters(int numFeaturesAdded)
dumpCustom
protected void dumpCustom(Entry[] sorted)
throws java.io.IOException
- Dumps the data that is specific to the classifier partition.
This will be any custom data that the classifier wants to store
as well as the set of docs that contributed to training each
classifier. This method is called automatically by the dump()
method of MemoryPartition and doesn't need to be called directly.
- Overrides:
dumpCustom
in class MemoryPartition
- Parameters:
sorted
- a sorted listed of all main dictionary entries
- Throws:
java.io.IOException
- if there is any error writing data.
newProperties
public void newProperties(com.sun.labs.util.props.PropertySheet ps)
throws com.sun.labs.util.props.PropertyException
- Specified by:
newProperties
in interface com.sun.labs.util.props.Configurable
- Overrides:
newProperties
in class MemoryPartition
- Throws:
com.sun.labs.util.props.PropertyException
getName
public java.lang.String getName()
- Overrides:
getName
in class Partition