Search in sources :

Example 1 with OperationType

use of org.apache.cassandra.db.compaction.OperationType in project cassandra by apache.

the class LogFile method make.

static LogFile make(String fileName, List<File> logReplicas) {
    Matcher matcher = LogFile.FILE_REGEX.matcher(fileName);
    boolean matched = matcher.matches();
    assert matched && matcher.groupCount() == 3;
    // For now we don't need this but it is there in case we need to change
    // file format later on, the version is the sstable version as defined in BigFormat
    //String version = matcher.group(1);
    OperationType operationType = OperationType.fromFileName(matcher.group(2));
    UUID id = UUID.fromString(matcher.group(3));
    return new LogFile(operationType, id, logReplicas);
}
Also used : Matcher(java.util.regex.Matcher) OperationType(org.apache.cassandra.db.compaction.OperationType)

Aggregations

Matcher (java.util.regex.Matcher)1 OperationType (org.apache.cassandra.db.compaction.OperationType)1