Class IndexDescriptor
java.lang.Object
org.apache.cassandra.index.sai.disk.format.IndexDescriptor
The
IndexDescriptor is an analog of the SSTable Descriptor and provides version
specific information about the on-disk state of a StorageAttachedIndex.
The IndexDescriptor is primarily responsible for maintaining a view of the on-disk state
of an index for a specific SSTable.
It is responsible for opening files for use by writers and readers.
Its remaining responsibility is to act as a proxy to the OnDiskFormat associated with the
index Version.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal ClusteringComparatorfinal PrimaryKey.Factoryfinal Descriptorfinal Version -
Method Summary
Modifier and TypeMethodDescriptioncomponentName(IndexComponent indexComponent) static IndexDescriptorcreate(Descriptor descriptor, IPartitioner partitioner, ClusteringComparator clusteringComparator) static IndexDescriptorcreate(SSTableReader sstable) voidcreateComponentOnDisk(IndexComponent component) voidcreateComponentOnDisk(IndexComponent component, IndexIdentifier indexIdentifier) createPerIndexFileHandle(IndexComponent indexComponent, IndexIdentifier indexIdentifier) createPerIndexFileHandle(IndexComponent indexComponent, IndexIdentifier indexIdentifier, Throwables.DiscreteAction<?> cleanup) createPerSSTableFileHandle(IndexComponent indexComponent, Throwables.DiscreteAction<?> cleanup) voiddeleteColumnIndex(IndexTermType indexTermType, IndexIdentifier indexIdentifier) voidbooleanfileFor(IndexComponent indexComponent) fileFor(IndexComponent indexComponent, IndexIdentifier indexIdentifier) getLivePerIndexComponents(IndexTermType indexTermType, IndexIdentifier indexIdentifier) booleanbooleanhasComponent(IndexComponent indexComponent) booleanhasComponent(IndexComponent indexComponent, IndexIdentifier indexIdentifier) inthashCode()booleanisIndexEmpty(IndexTermType indexTermType, IndexIdentifier indexIdentifier) booleanisPerColumnIndexBuildComplete(IndexIdentifier indexIdentifier) booleanlogMessage(String message) newPerColumnIndexWriter(StorageAttachedIndex index, LifecycleNewTracker tracker, RowMapping rowMapping) newPrimaryKeyMapFactory(SSTableReader sstable) newSSTableIndex(SSTableContext sstableContext, StorageAttachedIndex index) org.apache.lucene.store.IndexInputopenPerIndexInput(IndexComponent indexComponent, IndexIdentifier indexIdentifier) openPerIndexOutput(IndexComponent indexComponent, IndexIdentifier indexIdentifier) openPerIndexOutput(IndexComponent component, IndexIdentifier indexIdentifier, boolean append) org.apache.lucene.store.IndexInputopenPerSSTableInput(IndexComponent indexComponent) openPerSSTableOutput(IndexComponent component) openPerSSTableOutput(IndexComponent component, boolean append) longsizeOnDiskOfPerIndexComponent(IndexComponent indexComponent, IndexIdentifier indexIdentifier) longsizeOnDiskOfPerIndexComponents(IndexTermType indexTermType, IndexIdentifier indexIdentifier) longtoString()booleanvalidatePerIndexComponents(IndexTermType indexTermType, IndexIdentifier indexIdentifier, IndexValidation validation, boolean validateChecksum, boolean rethrow) booleanvalidatePerSSTableComponents(IndexValidation validation, boolean validateChecksum, boolean rethrow)
-
Field Details
-
version
-
sstableDescriptor
-
clusteringComparator
-
-
-
Method Details
-
create
public static IndexDescriptor create(Descriptor descriptor, IPartitioner partitioner, ClusteringComparator clusteringComparator) -
create
-
hasClustering
public boolean hasClustering() -
componentName
-
newPrimaryKeyMapFactory
-
newSSTableIndex
-
newPerSSTableIndexWriter
- Throws:
IOException
-
newPerColumnIndexWriter
public PerColumnIndexWriter newPerColumnIndexWriter(StorageAttachedIndex index, LifecycleNewTracker tracker, RowMapping rowMapping) -
isPerSSTableIndexBuildComplete
public boolean isPerSSTableIndexBuildComplete() -
isPerColumnIndexBuildComplete
-
hasComponent
-
hasComponent
-
fileFor
-
fileFor
-
isIndexEmpty
-
createComponentOnDisk
- Throws:
IOException
-
createComponentOnDisk
public void createComponentOnDisk(IndexComponent component, IndexIdentifier indexIdentifier) throws IOException - Throws:
IOException
-
openPerSSTableInput
-
openPerIndexInput
public org.apache.lucene.store.IndexInput openPerIndexInput(IndexComponent indexComponent, IndexIdentifier indexIdentifier) -
openPerSSTableOutput
- Throws:
IOException
-
openPerSSTableOutput
public IndexOutputWriter openPerSSTableOutput(IndexComponent component, boolean append) throws IOException - Throws:
IOException
-
openPerIndexOutput
public IndexOutputWriter openPerIndexOutput(IndexComponent indexComponent, IndexIdentifier indexIdentifier) throws IOException - Throws:
IOException
-
openPerIndexOutput
public IndexOutputWriter openPerIndexOutput(IndexComponent component, IndexIdentifier indexIdentifier, boolean append) throws IOException - Throws:
IOException
-
createPerSSTableFileHandle
public FileHandle createPerSSTableFileHandle(IndexComponent indexComponent, Throwables.DiscreteAction<?> cleanup) -
createPerIndexFileHandle
public FileHandle createPerIndexFileHandle(IndexComponent indexComponent, IndexIdentifier indexIdentifier) -
createPerIndexFileHandle
public FileHandle createPerIndexFileHandle(IndexComponent indexComponent, IndexIdentifier indexIdentifier, Throwables.DiscreteAction<?> cleanup) -
getLivePerSSTableComponents
-
getLivePerIndexComponents
public Set<Component> getLivePerIndexComponents(IndexTermType indexTermType, IndexIdentifier indexIdentifier) -
sizeOnDiskOfPerSSTableComponents
public long sizeOnDiskOfPerSSTableComponents() -
sizeOnDiskOfPerIndexComponents
public long sizeOnDiskOfPerIndexComponents(IndexTermType indexTermType, IndexIdentifier indexIdentifier) -
sizeOnDiskOfPerIndexComponent
public long sizeOnDiskOfPerIndexComponent(IndexComponent indexComponent, IndexIdentifier indexIdentifier) -
validatePerIndexComponents
public boolean validatePerIndexComponents(IndexTermType indexTermType, IndexIdentifier indexIdentifier, IndexValidation validation, boolean validateChecksum, boolean rethrow) -
validatePerSSTableComponents
public boolean validatePerSSTableComponents(IndexValidation validation, boolean validateChecksum, boolean rethrow) -
deletePerSSTableIndexComponents
public void deletePerSSTableIndexComponents() -
deleteColumnIndex
-
hashCode
public int hashCode() -
equals
-
toString
-
logMessage
-