com.sun.labs.minion.classification
Class ClusterDiskPartition
java.lang.Object
com.sun.labs.minion.indexer.partition.Partition
com.sun.labs.minion.indexer.partition.DiskPartition
com.sun.labs.minion.classification.ClusterDiskPartition
- All Implemented Interfaces:
- Closeable, com.sun.labs.util.props.Component, com.sun.labs.util.props.Configurable, java.lang.Comparable<Partition>
public class ClusterDiskPartition
- extends DiskPartition
A disk partition that will hold classifier data.
| Fields inherited from class com.sun.labs.minion.indexer.partition.DiskPartition |
BUFF_SIZE, deletions, delFile, delFileLock, docDict, docDictFile, docPostFile, documentDictFactory, dvl, ignored, mainDict, mainFiles, MATCH_CUT_OFF, MIN_LEN, removedFile, termCache |
| 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.DiskPartition |
close, close, createRemoveFile, delete, deleteDocument, deleteDocument, getAverageDocumentLength, getCloseTime, getDeletedDocumentsMap, getDelMap, getDocIDMap, getDocumentIterator, getDocumentIterator, getDocumentLength, getDocumentTerm, getDocumentTerm, getDocumentVectorLength, getDocumentVectorLength, getDocumentVectorLength, getDVL, getInputBuffers, getMainDictionary, getMainDictionaryIterator, getMainDictionaryIterator, getMainIterator, getMaxDocumentID, getMaxTermID, getNDocs, getNEntries, getNTokens, getTerm, getTerm, getTerm, getTerm, getTermCache, initAll, initDocDict, initDVL, initMainDict, initMainFiles, isDeleted, isIndexed, merge, merge, mergeCustom, normalize, setCloseTime, syncDeletedMap, toString, updatePartition |
| Methods inherited from class com.sun.labs.minion.indexer.partition.Partition |
compareTo, getAllFiles, getAllFiles, getDocFiles, getDocFiles, getIndexConfig, getMainFiles, getMainFiles, getManager, getName, getNumPostingsChannels, getPartitionNumber, getQueryConfig, getStats, newProperties |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
logTag
protected static java.lang.String logTag
modelInstance
protected ClassifierModel modelInstance
clustererInstance
protected FeatureClusterer clustererInstance
ClusterDiskPartition
public ClusterDiskPartition(java.lang.Integer partNum,
ClusterManager manager,
DictionaryFactory mainDictFactory,
DictionaryFactory documentDictFactory)
throws java.io.IOException
- Constructs a disk partition for a specific partition
number.
- Parameters:
partNum - the number of this partitionmanager - the classifier manager for this partition
- Throws:
java.io.IOException
getCluster
public FeatureCluster getCluster(java.lang.String clusterName)
- Gets a cluster by name
- Parameters:
clusterName - the name of the cluster
- Returns:
- the cluster with the given name
getClustersContaining
public FeatureClusterSet getClustersContaining(java.lang.String fname)
- Gets the clusters that contain the given feature
- Parameters:
fname - the feature to find
- Returns:
- the cluster containing that feature
makeCluster
protected FeatureCluster makeCluster(DocKeyEntry docEntry)
reap
protected static void reap(PartitionManager m,
int n)
- Reaps the given classifier partition.
- Parameters:
m - The manager associated with the partition.n - The partition number to reap.
docsAreMerged
public boolean docsAreMerged()
- Returns true if documents in this partition type can be merged -
that is, that the postings of two same-named docs in different
partitions will be combined.
- Overrides:
docsAreMerged in class DiskPartition
- Returns:
- true for clusters