public class Descriptor
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.lang.String |
cfname |
java.io.File |
directory |
SSTableFormat.Type |
formatType |
int |
generation |
java.lang.String |
ksname |
static java.lang.String |
TMP_EXT |
Version |
version
version has the following format:
[a-z]+ |
Constructor and Description |
---|
Descriptor(java.io.File directory,
java.lang.String ksname,
java.lang.String cfname,
int generation)
A descriptor that assumes CURRENT_VERSION.
|
Descriptor(java.io.File directory,
java.lang.String ksname,
java.lang.String cfname,
int generation,
SSTableFormat.Type formatType) |
Descriptor(java.lang.String version,
java.io.File directory,
java.lang.String ksname,
java.lang.String cfname,
int generation,
SSTableFormat.Type formatType) |
Descriptor(Version version,
java.io.File directory,
java.lang.String ksname,
java.lang.String cfname,
int generation,
SSTableFormat.Type formatType) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
baseFilename() |
boolean |
equals(java.lang.Object o) |
java.lang.String |
filenameFor(Component component) |
java.lang.String |
filenameFor(java.lang.String suffix) |
static Pair<Descriptor,java.lang.String> |
fromFilename(java.io.File directory,
java.lang.String name) |
static Pair<Descriptor,java.lang.String> |
fromFilename(java.io.File directory,
java.lang.String name,
boolean skipComponent)
Filename of the form is vary by version:
<ksname>-<cfname>-(tmp-)?<version>-<gen>-<component> for cassandra 2.0 and before
(<tmp marker>-)?<version>-<gen>-<component> for cassandra 3.0 and later
If this is for SSTable of secondary index, directory should ends with index name for 2.1+.
|
static Descriptor |
fromFilename(java.lang.String filename) |
static Descriptor |
fromFilename(java.lang.String filename,
boolean skipComponent) |
static Descriptor |
fromFilename(java.lang.String filename,
SSTableFormat.Type formatType) |
SSTableFormat |
getFormat() |
IMetadataSerializer |
getMetadataSerializer() |
java.util.List<java.io.File> |
getTemporaryFiles()
Return any temporary files found in the directory
|
int |
hashCode() |
boolean |
isCompatible() |
static boolean |
isLegacyFile(java.io.File file) |
static boolean |
isValidFile(java.lang.String fileName) |
java.lang.String |
relativeFilenameFor(Component component) |
java.lang.String |
tmpFilenameFor(Component component) |
java.lang.String |
toString() |
Descriptor |
withFormatType(SSTableFormat.Type newType) |
Descriptor |
withGeneration(int newGeneration) |
public static java.lang.String TMP_EXT
public final java.io.File directory
public final Version version
[a-z]+
public final java.lang.String ksname
public final java.lang.String cfname
public final int generation
public final SSTableFormat.Type formatType
public Descriptor(java.io.File directory, java.lang.String ksname, java.lang.String cfname, int generation)
public Descriptor(java.io.File directory, java.lang.String ksname, java.lang.String cfname, int generation, SSTableFormat.Type formatType)
public Descriptor(java.lang.String version, java.io.File directory, java.lang.String ksname, java.lang.String cfname, int generation, SSTableFormat.Type formatType)
public Descriptor(Version version, java.io.File directory, java.lang.String ksname, java.lang.String cfname, int generation, SSTableFormat.Type formatType)
public Descriptor withGeneration(int newGeneration)
public Descriptor withFormatType(SSTableFormat.Type newType)
public java.lang.String tmpFilenameFor(Component component)
public java.lang.String filenameFor(Component component)
public java.lang.String baseFilename()
public java.lang.String relativeFilenameFor(Component component)
public SSTableFormat getFormat()
public java.lang.String filenameFor(java.lang.String suffix)
suffix
- A component suffix, such as 'Data.db'/'Index.db'/etcpublic java.util.List<java.io.File> getTemporaryFiles()
public static boolean isLegacyFile(java.io.File file)
public static boolean isValidFile(java.lang.String fileName)
public static Descriptor fromFilename(java.lang.String filename)
filename
- The SSTable filenamefromFilename(File directory, String name)
public static Descriptor fromFilename(java.lang.String filename, SSTableFormat.Type formatType)
public static Descriptor fromFilename(java.lang.String filename, boolean skipComponent)
public static Pair<Descriptor,java.lang.String> fromFilename(java.io.File directory, java.lang.String name)
public static Pair<Descriptor,java.lang.String> fromFilename(java.io.File directory, java.lang.String name, boolean skipComponent)
directory
- The directory of the SSTable filesname
- The name of the SSTable fileskipComponent
- true if the name param should not be parsed for a component tagpublic IMetadataSerializer getMetadataSerializer()
public boolean isCompatible()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2015 The Apache Software Foundation