public class org.apache.cassandra.db.WindowsFailedSnapshotTracker
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.cassandra.db.WindowsFailedSnapshotTracker
super_class: java.lang.Object
{
private static final org.slf4j.Logger logger;
descriptor: Lorg/slf4j/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static java.io.PrintWriter _failedSnapshotFile;
descriptor: Ljava/io/PrintWriter;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
public static final java.lang.String TODELETEFILE;
descriptor: Ljava/lang/String;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
RuntimeInvisibleAnnotations:
com.google.common.annotations.VisibleForTesting()
static final boolean $assertionsDisabled;
descriptor: Z
flags: (0x1018) ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=0, args_size=0
0: ldc Lorg/apache/cassandra/db/WindowsFailedSnapshotTracker;
invokevirtual java.lang.Class.desiredAssertionStatus:()Z
ifne 1
iconst_1
goto 2
StackMap locals:
StackMap stack:
1: iconst_0
StackMap locals:
StackMap stack: int
2: putstatic org.apache.cassandra.db.WindowsFailedSnapshotTracker.$assertionsDisabled:Z
3: ldc Lorg/apache/cassandra/db/WindowsFailedSnapshotTracker;
invokestatic org.slf4j.LoggerFactory.getLogger:(Ljava/lang/Class;)Lorg/slf4j/Logger;
putstatic org.apache.cassandra.db.WindowsFailedSnapshotTracker.logger:Lorg/slf4j/Logger;
4: ldc "CASSANDRA_HOME"
invokestatic java.lang.System.getenv:(Ljava/lang/String;)Ljava/lang/String;
ifnonnull 6
5: ldc ".toDelete"
goto 7
6: StackMap locals:
StackMap stack:
new java.lang.StringBuilder
dup
ldc "CASSANDRA_HOME"
invokestatic java.lang.System.getenv:(Ljava/lang/String;)Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
getstatic java.io.File.separator:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc ".toDelete"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
7: StackMap locals:
StackMap stack: java.lang.String
putstatic org.apache.cassandra.db.WindowsFailedSnapshotTracker.TODELETEFILE:Ljava/lang/String;
8: return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/db/WindowsFailedSnapshotTracker;
public static void deleteOldSnapshots();
descriptor: ()V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=7, locals=10, args_size=0
0: new java.io.File
dup
getstatic org.apache.cassandra.db.WindowsFailedSnapshotTracker.TODELETEFILE:Ljava/lang/String;
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
invokevirtual java.io.File.exists:()Z
ifeq 29
1: aconst_null
astore 0
aconst_null
astore 1
2: new java.io.BufferedReader
dup
new java.io.FileReader
dup
getstatic org.apache.cassandra.db.WindowsFailedSnapshotTracker.TODELETEFILE:Ljava/lang/String;
invokespecial java.io.FileReader.<init>:(Ljava/lang/String;)V
invokespecial java.io.BufferedReader.<init>:(Ljava/io/Reader;)V
astore 2
start local 2 3: goto 17
start local 3 4: StackMap locals: java.lang.Throwable java.lang.Throwable java.io.BufferedReader java.lang.String
StackMap stack:
new java.io.File
dup
aload 3
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
astore 4
start local 4 5: new java.io.File
dup
ldc "TEMP"
invokestatic java.lang.System.getenv:(Ljava/lang/String;)Ljava/lang/String;
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
aload 4
invokestatic org.apache.cassandra.io.util.FileUtils.isSubDirectory:(Ljava/io/File;Ljava/io/File;)Z
istore 5
start local 5 6: invokestatic org.apache.cassandra.config.DatabaseDescriptor.getAllDataFileLocations:()[Ljava/lang/String;
dup
astore 9
arraylength
istore 8
iconst_0
istore 7
goto 10
StackMap locals: java.lang.Throwable java.lang.Throwable java.io.BufferedReader java.lang.String java.io.File int top int int java.lang.String[]
StackMap stack:
7: aload 9
iload 7
aaload
astore 6
start local 6 8: iload 5
new java.io.File
dup
aload 6
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
aload 4
invokestatic org.apache.cassandra.io.util.FileUtils.isSubDirectory:(Ljava/io/File;Ljava/io/File;)Z
ior
istore 5
end local 6 9: iinc 7 1
StackMap locals:
StackMap stack:
10: iload 7
iload 8
if_icmplt 7
11: iload 5
ifne 14
12: getstatic org.apache.cassandra.db.WindowsFailedSnapshotTracker.logger:Lorg/slf4j/Logger;
ldc "Skipping invalid directory found in .toDelete: {}. Only %TEMP% or data file subdirectories are valid."
aload 4
invokeinterface org.slf4j.Logger.warn:(Ljava/lang/String;Ljava/lang/Object;)V
13: goto 17
14: StackMap locals: java.lang.Throwable java.lang.Throwable java.io.BufferedReader java.lang.String java.io.File int
StackMap stack:
aload 4
invokevirtual java.io.File.exists:()Z
ifeq 17
15: getstatic org.apache.cassandra.db.WindowsFailedSnapshotTracker.logger:Lorg/slf4j/Logger;
ldc "Discovered obsolete snapshot. Deleting directory [{}]"
aload 3
invokeinterface org.slf4j.Logger.warn:(Ljava/lang/String;Ljava/lang/Object;)V
16: new java.io.File
dup
aload 3
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
invokestatic org.apache.cassandra.io.util.FileUtils.deleteRecursive:(Ljava/io/File;)V
end local 5 end local 4 end local 3 17: StackMap locals:
StackMap stack:
aload 2
invokevirtual java.io.BufferedReader.readLine:()Ljava/lang/String;
dup
astore 3
start local 3 18: ifnonnull 4
end local 3 19: aload 2
ifnull 25
aload 2
invokevirtual java.io.BufferedReader.close:()V
goto 25
StackMap locals:
StackMap stack: java.lang.Throwable
20: astore 0
aload 2
ifnull 21
aload 2
invokevirtual java.io.BufferedReader.close:()V
end local 2 StackMap locals:
StackMap stack:
21: aload 0
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
22: astore 1
aload 0
ifnonnull 23
aload 1
astore 0
goto 24
StackMap locals:
StackMap stack:
23: aload 0
aload 1
if_acmpeq 24
aload 0
aload 1
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
24: aload 0
athrow
25: StackMap locals:
StackMap stack:
getstatic org.apache.cassandra.db.WindowsFailedSnapshotTracker.TODELETEFILE:Ljava/lang/String;
iconst_0
anewarray java.lang.String
invokestatic java.nio.file.Paths.get:(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;
invokestatic java.nio.file.Files.delete:(Ljava/nio/file/Path;)V
26: goto 29
27: StackMap locals:
StackMap stack: java.io.IOException
astore 0
start local 0 28: getstatic org.apache.cassandra.db.WindowsFailedSnapshotTracker.logger:Lorg/slf4j/Logger;
ldc "Failed to open {}. Obsolete snapshots from previous runs will not be deleted."
getstatic org.apache.cassandra.db.WindowsFailedSnapshotTracker.TODELETEFILE:Ljava/lang/String;
aload 0
invokeinterface org.slf4j.Logger.warn:(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
end local 0 29: StackMap locals:
StackMap stack:
new java.io.PrintWriter
dup
new java.io.FileWriter
dup
getstatic org.apache.cassandra.db.WindowsFailedSnapshotTracker.TODELETEFILE:Ljava/lang/String;
iconst_1
invokespecial java.io.FileWriter.<init>:(Ljava/lang/String;Z)V
invokespecial java.io.PrintWriter.<init>:(Ljava/io/Writer;)V
putstatic org.apache.cassandra.db.WindowsFailedSnapshotTracker._failedSnapshotFile:Ljava/io/PrintWriter;
30: goto 33
31: StackMap locals:
StackMap stack: java.io.IOException
pop
32: new java.lang.RuntimeException
dup
ldc "Failed to create failed snapshot tracking file [%s]. Aborting"
iconst_1
anewarray java.lang.Object
dup
iconst_0
getstatic org.apache.cassandra.db.WindowsFailedSnapshotTracker.TODELETEFILE:Ljava/lang/String;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/String;)V
athrow
33: StackMap locals:
StackMap stack:
return
LocalVariableTable:
Start End Slot Name Signature
3 21 2 reader Ljava/io/BufferedReader;
4 17 3 snapshotDirectory Ljava/lang/String;
18 19 3 snapshotDirectory Ljava/lang/String;
5 17 4 f Ljava/io/File;
6 17 5 validFolder Z
8 9 6 s Ljava/lang/String;
28 29 0 e Ljava/io/IOException;
Exception table:
from to target type
3 19 20 any
2 22 22 any
1 26 27 Class java.io.IOException
29 30 31 Class java.io.IOException
public static synchronized void handleFailedSnapshot(java.io.File);
descriptor: (Ljava/io/File;)V
flags: (0x0029) ACC_PUBLIC, ACC_STATIC, ACC_SYNCHRONIZED
Code:
stack=3, locals=1, args_size=1
start local 0 0: getstatic org.apache.cassandra.db.WindowsFailedSnapshotTracker.$assertionsDisabled:Z
ifne 1
getstatic org.apache.cassandra.db.WindowsFailedSnapshotTracker._failedSnapshotFile:Ljava/io/PrintWriter;
ifnonnull 1
new java.lang.AssertionError
dup
ldc "_failedSnapshotFile not initialized within WindowsFailedSnapshotTracker"
invokespecial java.lang.AssertionError.<init>:(Ljava/lang/Object;)V
athrow
1: StackMap locals:
StackMap stack:
aload 0
invokestatic org.apache.cassandra.io.util.FileUtils.deleteRecursiveOnExit:(Ljava/io/File;)V
2: getstatic org.apache.cassandra.db.WindowsFailedSnapshotTracker._failedSnapshotFile:Ljava/io/PrintWriter;
aload 0
invokevirtual java.io.File.toString:()Ljava/lang/String;
invokevirtual java.io.PrintWriter.println:(Ljava/lang/String;)V
3: getstatic org.apache.cassandra.db.WindowsFailedSnapshotTracker._failedSnapshotFile:Ljava/io/PrintWriter;
invokevirtual java.io.PrintWriter.flush:()V
4: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 dir Ljava/io/File;
MethodParameters:
Name Flags
dir
public static void resetForTests();
descriptor: ()V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: getstatic org.apache.cassandra.db.WindowsFailedSnapshotTracker._failedSnapshotFile:Ljava/io/PrintWriter;
invokevirtual java.io.PrintWriter.close:()V
1: return
LocalVariableTable:
Start End Slot Name Signature
RuntimeInvisibleAnnotations:
com.google.common.annotations.VisibleForTesting()
}
SourceFile: "WindowsFailedSnapshotTracker.java"