public class org.apache.cassandra.db.commitlog.CommitLogArchiver
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.cassandra.db.commitlog.CommitLogArchiver
super_class: java.lang.Object
{
private static final org.slf4j.Logger logger;
descriptor: Lorg/slf4j/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
public static final java.text.SimpleDateFormat format;
descriptor: Ljava/text/SimpleDateFormat;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
private static final java.lang.String DELIMITER;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: ","
private static final java.util.regex.Pattern NAME;
descriptor: Ljava/util/regex/Pattern;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.util.regex.Pattern PATH;
descriptor: Ljava/util/regex/Pattern;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.util.regex.Pattern FROM;
descriptor: Ljava/util/regex/Pattern;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.util.regex.Pattern TO;
descriptor: Ljava/util/regex/Pattern;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
public final java.util.Map<java.lang.String, java.util.concurrent.Future<?>> archivePending;
descriptor: Ljava/util/Map;
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
Signature: Ljava/util/Map<Ljava/lang/String;Ljava/util/concurrent/Future<*>;>;
private final java.util.concurrent.ExecutorService executor;
descriptor: Ljava/util/concurrent/ExecutorService;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
final java.lang.String archiveCommand;
descriptor: Ljava/lang/String;
flags: (0x0010) ACC_FINAL
final java.lang.String restoreCommand;
descriptor: Ljava/lang/String;
flags: (0x0010) ACC_FINAL
final java.lang.String restoreDirectories;
descriptor: Ljava/lang/String;
flags: (0x0010) ACC_FINAL
public long restorePointInTime;
descriptor: J
flags: (0x0001) ACC_PUBLIC
public final java.util.concurrent.TimeUnit precision;
descriptor: Ljava/util/concurrent/TimeUnit;
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=0, args_size=0
0: ldc Lorg/apache/cassandra/db/commitlog/CommitLogArchiver;
invokestatic org.slf4j.LoggerFactory.getLogger:(Ljava/lang/Class;)Lorg/slf4j/Logger;
putstatic org.apache.cassandra.db.commitlog.CommitLogArchiver.logger:Lorg/slf4j/Logger;
1: new java.text.SimpleDateFormat
dup
ldc "yyyy:MM:dd HH:mm:ss"
invokespecial java.text.SimpleDateFormat.<init>:(Ljava/lang/String;)V
putstatic org.apache.cassandra.db.commitlog.CommitLogArchiver.format:Ljava/text/SimpleDateFormat;
2: ldc "%name"
invokestatic java.util.regex.Pattern.compile:(Ljava/lang/String;)Ljava/util/regex/Pattern;
putstatic org.apache.cassandra.db.commitlog.CommitLogArchiver.NAME:Ljava/util/regex/Pattern;
3: ldc "%path"
invokestatic java.util.regex.Pattern.compile:(Ljava/lang/String;)Ljava/util/regex/Pattern;
putstatic org.apache.cassandra.db.commitlog.CommitLogArchiver.PATH:Ljava/util/regex/Pattern;
4: ldc "%from"
invokestatic java.util.regex.Pattern.compile:(Ljava/lang/String;)Ljava/util/regex/Pattern;
putstatic org.apache.cassandra.db.commitlog.CommitLogArchiver.FROM:Ljava/util/regex/Pattern;
5: ldc "%to"
invokestatic java.util.regex.Pattern.compile:(Ljava/lang/String;)Ljava/util/regex/Pattern;
putstatic org.apache.cassandra.db.commitlog.CommitLogArchiver.TO:Ljava/util/regex/Pattern;
6: getstatic org.apache.cassandra.db.commitlog.CommitLogArchiver.format:Ljava/text/SimpleDateFormat;
ldc "GMT"
invokestatic java.util.TimeZone.getTimeZone:(Ljava/lang/String;)Ljava/util/TimeZone;
invokevirtual java.text.SimpleDateFormat.setTimeZone:(Ljava/util/TimeZone;)V
7: return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(java.lang.String, java.lang.String, java.lang.String, long, java.util.concurrent.TimeUnit);
descriptor: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;JLjava/util/concurrent/TimeUnit;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=7, args_size=6
start local 0 start local 1 start local 2 start local 3 start local 4 start local 6 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.util.concurrent.ConcurrentHashMap
dup
invokespecial java.util.concurrent.ConcurrentHashMap.<init>:()V
putfield org.apache.cassandra.db.commitlog.CommitLogArchiver.archivePending:Ljava/util/Map;
2: aload 0
aload 1
putfield org.apache.cassandra.db.commitlog.CommitLogArchiver.archiveCommand:Ljava/lang/String;
3: aload 0
aload 2
putfield org.apache.cassandra.db.commitlog.CommitLogArchiver.restoreCommand:Ljava/lang/String;
4: aload 0
aload 3
putfield org.apache.cassandra.db.commitlog.CommitLogArchiver.restoreDirectories:Ljava/lang/String;
5: aload 0
lload 4
putfield org.apache.cassandra.db.commitlog.CommitLogArchiver.restorePointInTime:J
6: aload 0
aload 6
putfield org.apache.cassandra.db.commitlog.CommitLogArchiver.precision:Ljava/util/concurrent/TimeUnit;
7: aload 0
aload 1
invokestatic com.google.common.base.Strings.isNullOrEmpty:(Ljava/lang/String;)Z
ifne 8
new org.apache.cassandra.concurrent.JMXEnabledThreadPoolExecutor
dup
ldc "CommitLogArchiver"
invokespecial org.apache.cassandra.concurrent.JMXEnabledThreadPoolExecutor.<init>:(Ljava/lang/String;)V
goto 9
StackMap locals: org.apache.cassandra.db.commitlog.CommitLogArchiver java.lang.String java.lang.String java.lang.String long java.util.concurrent.TimeUnit
StackMap stack: org.apache.cassandra.db.commitlog.CommitLogArchiver
8: aconst_null
StackMap locals: org.apache.cassandra.db.commitlog.CommitLogArchiver java.lang.String java.lang.String java.lang.String long java.util.concurrent.TimeUnit
StackMap stack: org.apache.cassandra.db.commitlog.CommitLogArchiver org.apache.cassandra.concurrent.JMXEnabledThreadPoolExecutor
9: putfield org.apache.cassandra.db.commitlog.CommitLogArchiver.executor:Ljava/util/concurrent/ExecutorService;
10: return
end local 6 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/apache/cassandra/db/commitlog/CommitLogArchiver;
0 11 1 archiveCommand Ljava/lang/String;
0 11 2 restoreCommand Ljava/lang/String;
0 11 3 restoreDirectories Ljava/lang/String;
0 11 4 restorePointInTime J
0 11 6 precision Ljava/util/concurrent/TimeUnit;
MethodParameters:
Name Flags
archiveCommand
restoreCommand
restoreDirectories
restorePointInTime
precision
public static org.apache.cassandra.db.commitlog.CommitLogArchiver disabled();
descriptor: ()Lorg/apache/cassandra/db/commitlog/CommitLogArchiver;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=8, locals=0, args_size=0
0: new org.apache.cassandra.db.commitlog.CommitLogArchiver
dup
aconst_null
aconst_null
aconst_null
ldc 9223372036854775807
getstatic java.util.concurrent.TimeUnit.MICROSECONDS:Ljava/util/concurrent/TimeUnit;
invokespecial org.apache.cassandra.db.commitlog.CommitLogArchiver.<init>:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;JLjava/util/concurrent/TimeUnit;)V
areturn
LocalVariableTable:
Start End Slot Name Signature
public static org.apache.cassandra.db.commitlog.CommitLogArchiver construct();
descriptor: ()Lorg/apache/cassandra/db/commitlog/CommitLogArchiver;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=8, locals=12, args_size=0
0: new java.util.Properties
dup
invokespecial java.util.Properties.<init>:()V
astore 0
start local 0 1: aconst_null
astore 1
aconst_null
astore 2
2: ldc Lorg/apache/cassandra/db/commitlog/CommitLogArchiver;
invokevirtual java.lang.Class.getClassLoader:()Ljava/lang/ClassLoader;
ldc "commitlog_archiving.properties"
invokevirtual java.lang.ClassLoader.getResourceAsStream:(Ljava/lang/String;)Ljava/io/InputStream;
astore 3
start local 3 3: aload 3
ifnonnull 8
4: getstatic org.apache.cassandra.db.commitlog.CommitLogArchiver.logger:Lorg/slf4j/Logger;
ldc "No commitlog_archiving properties found; archive + pitr will be disabled"
invokeinterface org.slf4j.Logger.trace:(Ljava/lang/String;)V
5: invokestatic org.apache.cassandra.db.commitlog.CommitLogArchiver.disabled:()Lorg/apache/cassandra/db/commitlog/CommitLogArchiver;
6: aload 3
ifnull 7
aload 3
invokevirtual java.io.InputStream.close:()V
7: StackMap locals: java.util.Properties java.lang.Throwable java.lang.Throwable java.io.InputStream
StackMap stack: org.apache.cassandra.db.commitlog.CommitLogArchiver
areturn
8: StackMap locals:
StackMap stack:
aload 0
aload 3
invokevirtual java.util.Properties.load:(Ljava/io/InputStream;)V
9: aload 0
ldc "archive_command"
invokevirtual java.util.Properties.getProperty:(Ljava/lang/String;)Ljava/lang/String;
astore 4
start local 4 10: aload 0
ldc "restore_command"
invokevirtual java.util.Properties.getProperty:(Ljava/lang/String;)Ljava/lang/String;
astore 5
start local 5 11: aload 0
ldc "restore_directories"
invokevirtual java.util.Properties.getProperty:(Ljava/lang/String;)Ljava/lang/String;
astore 6
start local 6 12: aload 6
ifnull 21
aload 6
invokevirtual java.lang.String.isEmpty:()Z
ifne 21
13: aload 6
ldc ","
invokevirtual java.lang.String.split:(Ljava/lang/String;)[Ljava/lang/String;
dup
astore 10
arraylength
istore 9
iconst_0
istore 8
goto 20
StackMap locals: java.util.Properties java.lang.Throwable java.lang.Throwable java.io.InputStream java.lang.String java.lang.String java.lang.String top int int java.lang.String[]
StackMap stack:
14: aload 10
iload 8
aaload
astore 7
start local 7 15: new java.io.File
dup
aload 7
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
astore 11
start local 11 16: aload 11
invokevirtual java.io.File.exists:()Z
ifne 19
17: aload 11
invokevirtual java.io.File.mkdir:()Z
ifne 19
18: new java.lang.RuntimeException
dup
new java.lang.StringBuilder
dup
ldc "Unable to create directory: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 7
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/String;)V
athrow
end local 11 end local 7 19: StackMap locals:
StackMap stack:
iinc 8 1
StackMap locals:
StackMap stack:
20: iload 8
iload 9
if_icmplt 14
21: StackMap locals: java.util.Properties java.lang.Throwable java.lang.Throwable java.io.InputStream java.lang.String java.lang.String java.lang.String
StackMap stack:
aload 0
ldc "restore_point_in_time"
invokevirtual java.util.Properties.getProperty:(Ljava/lang/String;)Ljava/lang/String;
astore 7
start local 7 22: aload 0
ldc "precision"
ldc "MICROSECONDS"
invokevirtual java.util.Properties.getProperty:(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
invokestatic java.util.concurrent.TimeUnit.valueOf:(Ljava/lang/String;)Ljava/util/concurrent/TimeUnit;
astore 8
start local 8 23: aload 7
invokestatic com.google.common.base.Strings.isNullOrEmpty:(Ljava/lang/String;)Z
ifeq 24
ldc 9223372036854775807
goto 25
StackMap locals: java.lang.String java.util.concurrent.TimeUnit
StackMap stack:
24: getstatic org.apache.cassandra.db.commitlog.CommitLogArchiver.format:Ljava/text/SimpleDateFormat;
aload 7
invokevirtual java.text.SimpleDateFormat.parse:(Ljava/lang/String;)Ljava/util/Date;
invokevirtual java.util.Date.getTime:()J
StackMap locals:
StackMap stack: long
25: lstore 9
start local 9 26: goto 29
end local 9 27: StackMap locals:
StackMap stack: java.text.ParseException
astore 11
start local 11 28: new java.lang.RuntimeException
dup
ldc "Unable to parse restore target time"
aload 11
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 11 start local 9 29: StackMap locals: long
StackMap stack:
new org.apache.cassandra.db.commitlog.CommitLogArchiver
dup
aload 4
aload 5
aload 6
lload 9
aload 8
invokespecial org.apache.cassandra.db.commitlog.CommitLogArchiver.<init>:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;JLjava/util/concurrent/TimeUnit;)V
30: aload 3
ifnull 31
aload 3
invokevirtual java.io.InputStream.close:()V
31: StackMap locals:
StackMap stack: org.apache.cassandra.db.commitlog.CommitLogArchiver
areturn
end local 9 end local 8 end local 7 end local 6 end local 5 end local 4 StackMap locals: java.util.Properties java.lang.Throwable java.lang.Throwable java.io.InputStream
StackMap stack: java.lang.Throwable
32: astore 1
33: aload 3
ifnull 34
aload 3
invokevirtual java.io.InputStream.close:()V
end local 3 StackMap locals:
StackMap stack:
34: aload 1
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
35: astore 2
aload 1
ifnonnull 36
aload 2
astore 1
goto 37
StackMap locals:
StackMap stack:
36: aload 1
aload 2
if_acmpeq 37
aload 1
aload 2
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
37: aload 1
athrow
38: StackMap locals: java.util.Properties
StackMap stack: java.io.IOException
astore 1
start local 1 39: new java.lang.RuntimeException
dup
ldc "Unable to load commitlog_archiving.properties"
aload 1
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
1 40 0 commitlog_commands Ljava/util/Properties;
3 34 3 stream Ljava/io/InputStream;
10 32 4 archiveCommand Ljava/lang/String;
11 32 5 restoreCommand Ljava/lang/String;
12 32 6 restoreDirectories Ljava/lang/String;
15 19 7 dir Ljava/lang/String;
16 19 11 directory Ljava/io/File;
22 32 7 targetTime Ljava/lang/String;
23 32 8 precision Ljava/util/concurrent/TimeUnit;
26 27 9 restorePointInTime J
29 32 9 restorePointInTime J
28 29 11 e Ljava/text/ParseException;
39 40 1 e Ljava/io/IOException;
Exception table:
from to target type
23 26 27 Class java.text.ParseException
3 6 32 any
8 30 32 any
2 7 35 any
8 31 35 any
32 35 35 any
1 7 38 Class java.io.IOException
8 31 38 Class java.io.IOException
32 38 38 Class java.io.IOException
public void maybeArchive(org.apache.cassandra.db.commitlog.CommitLogSegment);
descriptor: (Lorg/apache/cassandra/db/commitlog/CommitLogSegment;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.apache.cassandra.db.commitlog.CommitLogArchiver.archiveCommand:Ljava/lang/String;
invokestatic com.google.common.base.Strings.isNullOrEmpty:(Ljava/lang/String;)Z
ifeq 2
1: return
2: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.db.commitlog.CommitLogArchiver.archivePending:Ljava/util/Map;
aload 1
invokevirtual org.apache.cassandra.db.commitlog.CommitLogSegment.getName:()Ljava/lang/String;
aload 0
getfield org.apache.cassandra.db.commitlog.CommitLogArchiver.executor:Ljava/util/concurrent/ExecutorService;
new org.apache.cassandra.db.commitlog.CommitLogArchiver$1
dup
aload 0
aload 1
invokespecial org.apache.cassandra.db.commitlog.CommitLogArchiver$1.<init>:(Lorg/apache/cassandra/db/commitlog/CommitLogArchiver;Lorg/apache/cassandra/db/commitlog/CommitLogSegment;)V
invokeinterface java.util.concurrent.ExecutorService.submit:(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/apache/cassandra/db/commitlog/CommitLogArchiver;
0 4 1 segment Lorg/apache/cassandra/db/commitlog/CommitLogSegment;
MethodParameters:
Name Flags
segment final
public void maybeArchive(java.lang.String, java.lang.String);
descriptor: (Ljava/lang/String;Ljava/lang/String;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=8, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield org.apache.cassandra.db.commitlog.CommitLogArchiver.archiveCommand:Ljava/lang/String;
invokestatic com.google.common.base.Strings.isNullOrEmpty:(Ljava/lang/String;)Z
ifeq 2
1: return
2: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.db.commitlog.CommitLogArchiver.archivePending:Ljava/util/Map;
aload 2
aload 0
getfield org.apache.cassandra.db.commitlog.CommitLogArchiver.executor:Ljava/util/concurrent/ExecutorService;
new org.apache.cassandra.db.commitlog.CommitLogArchiver$2
dup
aload 0
aload 2
aload 1
invokespecial org.apache.cassandra.db.commitlog.CommitLogArchiver$2.<init>:(Lorg/apache/cassandra/db/commitlog/CommitLogArchiver;Ljava/lang/String;Ljava/lang/String;)V
invokeinterface java.util.concurrent.ExecutorService.submit:(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
3: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/apache/cassandra/db/commitlog/CommitLogArchiver;
0 4 1 path Ljava/lang/String;
0 4 2 name Ljava/lang/String;
MethodParameters:
Name Flags
path final
name final
public boolean maybeWaitForArchiving(java.lang.String);
descriptor: (Ljava/lang/String;)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=4, args_size=2
start local 0 start local 1 0: aload 0
getfield org.apache.cassandra.db.commitlog.CommitLogArchiver.archivePending:Ljava/util/Map;
aload 1
invokeinterface java.util.Map.remove:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.util.concurrent.Future
astore 2
start local 2 1: aload 2
ifnonnull 3
2: iconst_1
ireturn
3: StackMap locals: java.util.concurrent.Future
StackMap stack:
aload 2
invokeinterface java.util.concurrent.Future.get:()Ljava/lang/Object;
pop
4: goto 13
5: StackMap locals:
StackMap stack: java.lang.InterruptedException
astore 3
start local 3 6: new java.lang.AssertionError
dup
aload 3
invokespecial java.lang.AssertionError.<init>:(Ljava/lang/Object;)V
athrow
end local 3 7: StackMap locals:
StackMap stack: java.util.concurrent.ExecutionException
astore 3
start local 3 8: aload 3
invokevirtual java.util.concurrent.ExecutionException.getCause:()Ljava/lang/Throwable;
instanceof java.lang.RuntimeException
ifeq 12
9: aload 3
invokevirtual java.util.concurrent.ExecutionException.getCause:()Ljava/lang/Throwable;
invokevirtual java.lang.Throwable.getCause:()Ljava/lang/Throwable;
instanceof java.io.IOException
ifeq 12
10: getstatic org.apache.cassandra.db.commitlog.CommitLogArchiver.logger:Lorg/slf4j/Logger;
ldc "Looks like the archiving of file {} failed earlier, cassandra is going to ignore this segment for now."
aload 1
aload 3
invokevirtual java.util.concurrent.ExecutionException.getCause:()Ljava/lang/Throwable;
invokevirtual java.lang.Throwable.getCause:()Ljava/lang/Throwable;
invokeinterface org.slf4j.Logger.error:(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
11: iconst_0
ireturn
12: StackMap locals: java.util.concurrent.ExecutionException
StackMap stack:
new java.lang.RuntimeException
dup
aload 3
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 3 13: StackMap locals:
StackMap stack:
iconst_1
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Lorg/apache/cassandra/db/commitlog/CommitLogArchiver;
0 14 1 name Ljava/lang/String;
1 14 2 f Ljava/util/concurrent/Future<*>;
6 7 3 e Ljava/lang/InterruptedException;
8 13 3 e Ljava/util/concurrent/ExecutionException;
Exception table:
from to target type
3 4 5 Class java.lang.InterruptedException
3 4 7 Class java.util.concurrent.ExecutionException
MethodParameters:
Name Flags
name
public void maybeRestoreArchive();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=16, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.db.commitlog.CommitLogArchiver.restoreDirectories:Ljava/lang/String;
invokestatic com.google.common.base.Strings.isNullOrEmpty:(Ljava/lang/String;)Z
ifeq 2
1: return
2: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.db.commitlog.CommitLogArchiver.restoreDirectories:Ljava/lang/String;
ldc ","
invokevirtual java.lang.String.split:(Ljava/lang/String;)[Ljava/lang/String;
dup
astore 4
arraylength
istore 3
iconst_0
istore 2
goto 45
StackMap locals: org.apache.cassandra.db.commitlog.CommitLogArchiver top int int java.lang.String[]
StackMap stack:
3: aload 4
iload 2
aaload
astore 1
start local 1 4: new java.io.File
dup
aload 1
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
invokevirtual java.io.File.listFiles:()[Ljava/io/File;
astore 5
start local 5 5: aload 5
ifnonnull 7
6: new java.lang.RuntimeException
dup
new java.lang.StringBuilder
dup
ldc "Unable to list directory "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/String;)V
athrow
7: StackMap locals: org.apache.cassandra.db.commitlog.CommitLogArchiver java.lang.String int int java.lang.String[] java.io.File[]
StackMap stack:
aload 5
dup
astore 9
arraylength
istore 8
iconst_0
istore 7
goto 43
StackMap locals: org.apache.cassandra.db.commitlog.CommitLogArchiver java.lang.String int int java.lang.String[] java.io.File[] top int int java.io.File[]
StackMap stack:
8: aload 9
iload 7
aaload
astore 6
start local 6 9: aload 6
invokestatic org.apache.cassandra.config.DatabaseDescriptor.getEncryptionContext:()Lorg/apache/cassandra/security/EncryptionContext;
invokestatic org.apache.cassandra.db.commitlog.CommitLogDescriptor.fromHeader:(Ljava/io/File;Lorg/apache/cassandra/security/EncryptionContext;)Lorg/apache/cassandra/db/commitlog/CommitLogDescriptor;
astore 10
start local 10 10: aload 6
invokevirtual java.io.File.getName:()Ljava/lang/String;
invokestatic org.apache.cassandra.db.commitlog.CommitLogDescriptor.isValid:(Ljava/lang/String;)Z
ifeq 11
aload 6
invokevirtual java.io.File.getName:()Ljava/lang/String;
invokestatic org.apache.cassandra.db.commitlog.CommitLogDescriptor.fromFileName:(Ljava/lang/String;)Lorg/apache/cassandra/db/commitlog/CommitLogDescriptor;
goto 12
StackMap locals: org.apache.cassandra.db.commitlog.CommitLogArchiver java.lang.String int int java.lang.String[] java.io.File[] java.io.File int int java.io.File[] org.apache.cassandra.db.commitlog.CommitLogDescriptor
StackMap stack:
11: aconst_null
StackMap locals:
StackMap stack: org.apache.cassandra.db.commitlog.CommitLogDescriptor
12: astore 11
start local 11 13: aload 10
ifnonnull 15
aload 11
ifnonnull 15
14: new java.lang.IllegalStateException
dup
new java.lang.StringBuilder
dup
ldc "Cannot safely construct descriptor for segment, either from its name or its header: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 6
invokevirtual java.io.File.getPath:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
15: StackMap locals: org.apache.cassandra.db.commitlog.CommitLogDescriptor
StackMap stack:
aload 10
ifnull 17
aload 11
ifnull 17
aload 10
aload 11
invokevirtual org.apache.cassandra.db.commitlog.CommitLogDescriptor.equalsIgnoringCompression:(Lorg/apache/cassandra/db/commitlog/CommitLogDescriptor;)Z
ifne 17
16: new java.lang.IllegalStateException
dup
ldc "Cannot safely construct descriptor for segment, as name and header descriptors do not match (%s vs %s): %s"
iconst_3
anewarray java.lang.Object
dup
iconst_0
aload 10
aastore
dup
iconst_1
aload 11
aastore
dup
iconst_2
aload 6
invokevirtual java.io.File.getPath:()Ljava/lang/String;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
17: StackMap locals:
StackMap stack:
aload 11
ifnull 19
aload 10
ifnonnull 19
aload 11
getfield org.apache.cassandra.db.commitlog.CommitLogDescriptor.version:I
iconst_4
if_icmplt 19
18: new java.lang.IllegalStateException
dup
new java.lang.StringBuilder
dup
ldc "Cannot safely construct descriptor for segment, as name descriptor implies a version that should contain a header descriptor, but that descriptor could not be read: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 6
invokevirtual java.io.File.getPath:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
19: StackMap locals:
StackMap stack:
aload 10
ifnull 22
20: aload 10
astore 12
start local 12 21: goto 23
end local 12 22: StackMap locals:
StackMap stack:
aload 11
astore 12
start local 12 23: StackMap locals: org.apache.cassandra.db.commitlog.CommitLogDescriptor
StackMap stack:
aload 12
getfield org.apache.cassandra.db.commitlog.CommitLogDescriptor.version:I
bipush 6
if_icmple 25
24: new java.lang.IllegalStateException
dup
new java.lang.StringBuilder
dup
ldc "Unsupported commit log version: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 12
getfield org.apache.cassandra.db.commitlog.CommitLogDescriptor.version:I
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
25: StackMap locals:
StackMap stack:
aload 12
getfield org.apache.cassandra.db.commitlog.CommitLogDescriptor.compression:Lorg/apache/cassandra/config/ParameterizedClass;
ifnull 30
26: aload 12
getfield org.apache.cassandra.db.commitlog.CommitLogDescriptor.compression:Lorg/apache/cassandra/config/ParameterizedClass;
invokestatic org.apache.cassandra.schema.CompressionParams.createCompressor:(Lorg/apache/cassandra/config/ParameterizedClass;)Lorg/apache/cassandra/io/compress/ICompressor;
pop
27: goto 30
28: StackMap locals:
StackMap stack: org.apache.cassandra.exceptions.ConfigurationException
astore 13
start local 13 29: new java.lang.IllegalStateException
dup
ldc "Unknown compression"
aload 13
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 13 30: StackMap locals:
StackMap stack:
new java.io.File
dup
invokestatic org.apache.cassandra.config.DatabaseDescriptor.getCommitLogLocation:()Ljava/lang/String;
aload 12
invokevirtual org.apache.cassandra.db.commitlog.CommitLogDescriptor.fileName:()Ljava/lang/String;
invokespecial java.io.File.<init>:(Ljava/lang/String;Ljava/lang/String;)V
astore 13
start local 13 31: aload 13
invokevirtual java.io.File.exists:()Z
ifeq 36
32: getstatic org.apache.cassandra.db.commitlog.CommitLogArchiver.logger:Lorg/slf4j/Logger;
ldc "Skipping restore of archive {} as the segment already exists in the restore location {}"
33: aload 6
invokevirtual java.io.File.getPath:()Ljava/lang/String;
aload 13
invokevirtual java.io.File.getPath:()Ljava/lang/String;
34: invokeinterface org.slf4j.Logger.trace:(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
35: goto 42
36: StackMap locals: java.io.File
StackMap stack:
getstatic org.apache.cassandra.db.commitlog.CommitLogArchiver.FROM:Ljava/util/regex/Pattern;
aload 0
getfield org.apache.cassandra.db.commitlog.CommitLogArchiver.restoreCommand:Ljava/lang/String;
invokevirtual java.util.regex.Pattern.matcher:(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
aload 6
invokevirtual java.io.File.getPath:()Ljava/lang/String;
invokestatic java.util.regex.Matcher.quoteReplacement:(Ljava/lang/String;)Ljava/lang/String;
invokevirtual java.util.regex.Matcher.replaceAll:(Ljava/lang/String;)Ljava/lang/String;
astore 14
start local 14 37: getstatic org.apache.cassandra.db.commitlog.CommitLogArchiver.TO:Ljava/util/regex/Pattern;
aload 14
invokevirtual java.util.regex.Pattern.matcher:(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
aload 13
invokevirtual java.io.File.getPath:()Ljava/lang/String;
invokestatic java.util.regex.Matcher.quoteReplacement:(Ljava/lang/String;)Ljava/lang/String;
invokevirtual java.util.regex.Matcher.replaceAll:(Ljava/lang/String;)Ljava/lang/String;
astore 14
38: aload 0
aload 14
invokevirtual org.apache.cassandra.db.commitlog.CommitLogArchiver.exec:(Ljava/lang/String;)V
39: goto 42
40: StackMap locals: org.apache.cassandra.db.commitlog.CommitLogArchiver java.lang.String int int java.lang.String[] java.io.File[] java.io.File int int java.io.File[] org.apache.cassandra.db.commitlog.CommitLogDescriptor org.apache.cassandra.db.commitlog.CommitLogDescriptor org.apache.cassandra.db.commitlog.CommitLogDescriptor java.io.File java.lang.String
StackMap stack: java.io.IOException
astore 15
start local 15 41: new java.lang.RuntimeException
dup
aload 15
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 15 end local 14 end local 13 end local 12 end local 11 end local 10 end local 6 42: StackMap locals: org.apache.cassandra.db.commitlog.CommitLogArchiver java.lang.String int int java.lang.String[] java.io.File[] top int int java.io.File[]
StackMap stack:
iinc 7 1
StackMap locals:
StackMap stack:
43: iload 7
iload 8
if_icmplt 8
end local 5 end local 1 44: iinc 2 1
StackMap locals: org.apache.cassandra.db.commitlog.CommitLogArchiver top int int java.lang.String[]
StackMap stack:
45: iload 2
iload 3
if_icmplt 3
46: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 47 0 this Lorg/apache/cassandra/db/commitlog/CommitLogArchiver;
4 44 1 dir Ljava/lang/String;
5 44 5 files [Ljava/io/File;
9 42 6 fromFile Ljava/io/File;
10 42 10 fromHeader Lorg/apache/cassandra/db/commitlog/CommitLogDescriptor;
13 42 11 fromName Lorg/apache/cassandra/db/commitlog/CommitLogDescriptor;
21 22 12 descriptor Lorg/apache/cassandra/db/commitlog/CommitLogDescriptor;
23 42 12 descriptor Lorg/apache/cassandra/db/commitlog/CommitLogDescriptor;
29 30 13 e Lorg/apache/cassandra/exceptions/ConfigurationException;
31 42 13 toFile Ljava/io/File;
37 42 14 command Ljava/lang/String;
41 42 15 e Ljava/io/IOException;
Exception table:
from to target type
26 27 28 Class org.apache.cassandra.exceptions.ConfigurationException
38 39 40 Class java.io.IOException
private void exec(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=3, args_size=2
start local 0 start local 1 0: new java.lang.ProcessBuilder
dup
aload 1
ldc " "
invokevirtual java.lang.String.split:(Ljava/lang/String;)[Ljava/lang/String;
invokespecial java.lang.ProcessBuilder.<init>:([Ljava/lang/String;)V
astore 2
start local 2 1: aload 2
iconst_1
invokevirtual java.lang.ProcessBuilder.redirectErrorStream:(Z)Ljava/lang/ProcessBuilder;
pop
2: aload 2
invokestatic org.apache.cassandra.utils.FBUtilities.exec:(Ljava/lang/ProcessBuilder;)V
3: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/apache/cassandra/db/commitlog/CommitLogArchiver;
0 4 1 command Ljava/lang/String;
1 4 2 pb Ljava/lang/ProcessBuilder;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
command
}
SourceFile: "CommitLogArchiver.java"
NestMembers:
org.apache.cassandra.db.commitlog.CommitLogArchiver$1 org.apache.cassandra.db.commitlog.CommitLogArchiver$2
InnerClasses:
org.apache.cassandra.db.commitlog.CommitLogArchiver$1
org.apache.cassandra.db.commitlog.CommitLogArchiver$2