com.sun.labs.minion.classification
Class ClusterDiskPartition

java.lang.Object
  extended by com.sun.labs.minion.indexer.partition.Partition
      extended by com.sun.labs.minion.indexer.partition.DiskPartition
          extended by 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.


Field Summary
protected  FeatureClusterer clustererInstance
           
protected static java.lang.String logTag
           
protected  ClassifierModel modelInstance
           
 
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
 
Constructor Summary
ClusterDiskPartition(java.lang.Integer partNum, ClusterManager manager, DictionaryFactory mainDictFactory, DictionaryFactory documentDictFactory)
          Constructs a disk partition for a specific partition number.
 
Method Summary
 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.
 FeatureCluster getCluster(java.lang.String clusterName)
          Gets a cluster by name
 FeatureClusterSet getClustersContaining(java.lang.String fname)
          Gets the clusters that contain the given feature
protected  FeatureCluster makeCluster(DocKeyEntry docEntry)
           
protected static void reap(PartitionManager m, int n)
          Reaps the given classifier partition.
 
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
 

Field Detail

logTag

protected static java.lang.String logTag

modelInstance

protected ClassifierModel modelInstance

clustererInstance

protected FeatureClusterer clustererInstance
Constructor Detail

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 partition
manager - the classifier manager for this partition
Throws:
java.io.IOException
Method Detail

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