public class org.apache.cassandra.config.YamlConfigurationLoader implements org.apache.cassandra.config.ConfigurationLoader
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.cassandra.config.YamlConfigurationLoader
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 final java.lang.String DEFAULT_CONFIGURATION;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "cassandra.yaml"
private static java.net.URL storageConfigURL;
descriptor: Ljava/net/URL;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lorg/apache/cassandra/config/YamlConfigurationLoader;
invokestatic org.slf4j.LoggerFactory.getLogger:(Ljava/lang/Class;)Lorg/slf4j/Logger;
putstatic org.apache.cassandra.config.YamlConfigurationLoader.logger:Lorg/slf4j/Logger;
1: 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/config/YamlConfigurationLoader;
private static java.net.URL getStorageConfigURL();
descriptor: ()Ljava/net/URL;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=7, locals=4, args_size=0
0: ldc "cassandra.config"
invokestatic java.lang.System.getProperty:(Ljava/lang/String;)Ljava/lang/String;
astore 0
start local 0 1: aload 0
ifnonnull 3
2: ldc "cassandra.yaml"
astore 0
3: StackMap locals: java.lang.String
StackMap stack:
new java.net.URL
dup
aload 0
invokespecial java.net.URL.<init>:(Ljava/lang/String;)V
astore 1
start local 1 4: aload 1
invokevirtual java.net.URL.openStream:()Ljava/io/InputStream;
invokevirtual java.io.InputStream.close:()V
5: goto 17
end local 1 6: StackMap locals:
StackMap stack: java.lang.Exception
pop
7: ldc Lorg/apache/cassandra/config/DatabaseDescriptor;
invokevirtual java.lang.Class.getClassLoader:()Ljava/lang/ClassLoader;
astore 2
start local 2 8: aload 2
aload 0
invokevirtual java.lang.ClassLoader.getResource:(Ljava/lang/String;)Ljava/net/URL;
astore 1
start local 1 9: aload 1
ifnonnull 17
10: new java.lang.StringBuilder
dup
ldc "file:"
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;
getstatic java.io.File.separator:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 3
start local 3 11: aload 0
aload 3
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifne 16
12: new org.apache.cassandra.exceptions.ConfigurationException
dup
13: ldc "Expecting URI in variable: [cassandra.config]. Found[%s]. Please prefix the file with [%s%s] for local files and [%s<server>%s] for remote files. If you are executing this from an external tool, it needs to set Config.setClientMode(true) to avoid loading configuration."
iconst_5
anewarray java.lang.Object
dup
iconst_0
14: aload 0
aastore
dup
iconst_1
aload 3
aastore
dup
iconst_2
getstatic java.io.File.separator:Ljava/lang/String;
aastore
dup
iconst_3
aload 3
aastore
dup
iconst_4
getstatic java.io.File.separator:Ljava/lang/String;
aastore
15: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial org.apache.cassandra.exceptions.ConfigurationException.<init>:(Ljava/lang/String;)V
athrow
16: StackMap locals: java.net.URL java.lang.ClassLoader java.lang.String
StackMap stack:
new org.apache.cassandra.exceptions.ConfigurationException
dup
new java.lang.StringBuilder
dup
ldc "Cannot locate "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc ". If this is a local file, please confirm you've provided "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 3
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
getstatic java.io.File.separator:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc " as a URI prefix."
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial org.apache.cassandra.exceptions.ConfigurationException.<init>:(Ljava/lang/String;)V
athrow
end local 3 end local 2 17: StackMap locals:
StackMap stack:
getstatic org.apache.cassandra.config.YamlConfigurationLoader.logger:Lorg/slf4j/Logger;
ldc "Configuration location: {}"
aload 1
invokeinterface org.slf4j.Logger.info:(Ljava/lang/String;Ljava/lang/Object;)V
18: aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
1 19 0 configUrl Ljava/lang/String;
4 6 1 url Ljava/net/URL;
9 19 1 url Ljava/net/URL;
8 17 2 loader Ljava/lang/ClassLoader;
11 17 3 required Ljava/lang/String;
Exception table:
from to target type
3 5 6 Class java.lang.Exception
Exceptions:
throws org.apache.cassandra.exceptions.ConfigurationException
public org.apache.cassandra.config.Config loadConfig();
descriptor: ()Lorg/apache/cassandra/config/Config;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: getstatic org.apache.cassandra.config.YamlConfigurationLoader.storageConfigURL:Ljava/net/URL;
ifnonnull 2
1: invokestatic org.apache.cassandra.config.YamlConfigurationLoader.getStorageConfigURL:()Ljava/net/URL;
putstatic org.apache.cassandra.config.YamlConfigurationLoader.storageConfigURL:Ljava/net/URL;
2: StackMap locals:
StackMap stack:
aload 0
getstatic org.apache.cassandra.config.YamlConfigurationLoader.storageConfigURL:Ljava/net/URL;
invokevirtual org.apache.cassandra.config.YamlConfigurationLoader.loadConfig:(Ljava/net/URL;)Lorg/apache/cassandra/config/Config;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/apache/cassandra/config/YamlConfigurationLoader;
Exceptions:
throws org.apache.cassandra.exceptions.ConfigurationException
public org.apache.cassandra.config.Config loadConfig(java.net.URL);
descriptor: (Ljava/net/URL;)Lorg/apache/cassandra/config/Config;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=7, args_size=2
start local 0 start local 1 0: getstatic org.apache.cassandra.config.YamlConfigurationLoader.logger:Lorg/slf4j/Logger;
ldc "Loading settings from {}"
aload 1
invokeinterface org.slf4j.Logger.debug:(Ljava/lang/String;Ljava/lang/Object;)V
1: aconst_null
astore 3
aconst_null
astore 4
2: aload 1
invokevirtual java.net.URL.openStream:()Ljava/io/InputStream;
astore 5
start local 5 3: aload 5
invokestatic com.google.common.io.ByteStreams.toByteArray:(Ljava/io/InputStream;)[B
astore 2
start local 2 4: aload 5
ifnull 12
aload 5
invokevirtual java.io.InputStream.close:()V
goto 12
end local 2 StackMap locals: org.apache.cassandra.config.YamlConfigurationLoader java.net.URL top java.lang.Throwable java.lang.Throwable java.io.InputStream
StackMap stack: java.lang.Throwable
5: astore 3
aload 5
ifnull 6
aload 5
invokevirtual java.io.InputStream.close:()V
end local 5 StackMap locals:
StackMap stack:
6: aload 3
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
7: astore 4
aload 3
ifnonnull 8
aload 4
astore 3
goto 9
StackMap locals:
StackMap stack:
8: aload 3
aload 4
if_acmpeq 9
aload 3
aload 4
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
9: aload 3
athrow
10: StackMap locals: org.apache.cassandra.config.YamlConfigurationLoader java.net.URL
StackMap stack: java.io.IOException
astore 3
start local 3 11: new java.lang.AssertionError
dup
aload 3
invokespecial java.lang.AssertionError.<init>:(Ljava/lang/Object;)V
athrow
end local 3 start local 2 12: StackMap locals: byte[]
StackMap stack:
new org.apache.cassandra.config.YamlConfigurationLoader$CustomConstructor
dup
ldc Lorg/apache/cassandra/config/Config;
invokespecial org.apache.cassandra.config.YamlConfigurationLoader$CustomConstructor.<init>:(Ljava/lang/Class;)V
astore 3
start local 3 13: new org.apache.cassandra.config.YamlConfigurationLoader$PropertiesChecker
dup
invokespecial org.apache.cassandra.config.YamlConfigurationLoader$PropertiesChecker.<init>:()V
astore 4
start local 4 14: aload 3
aload 4
invokevirtual org.yaml.snakeyaml.constructor.Constructor.setPropertyUtils:(Lorg/yaml/snakeyaml/introspector/PropertyUtils;)V
15: new org.yaml.snakeyaml.Yaml
dup
aload 3
invokespecial org.yaml.snakeyaml.Yaml.<init>:(Lorg/yaml/snakeyaml/constructor/BaseConstructor;)V
astore 5
start local 5 16: aload 0
aload 5
aload 2
invokevirtual org.apache.cassandra.config.YamlConfigurationLoader.loadConfig:(Lorg/yaml/snakeyaml/Yaml;[B)Lorg/apache/cassandra/config/Config;
astore 6
start local 6 17: aload 4
invokevirtual org.apache.cassandra.config.YamlConfigurationLoader$PropertiesChecker.check:()V
18: aload 6
19: areturn
end local 6 end local 5 end local 4 end local 3 end local 2 20: StackMap locals: org.apache.cassandra.config.YamlConfigurationLoader java.net.URL
StackMap stack: org.yaml.snakeyaml.error.YAMLException
astore 2
start local 2 21: new org.apache.cassandra.exceptions.ConfigurationException
dup
new java.lang.StringBuilder
dup
ldc "Invalid yaml: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
getstatic org.apache.commons.lang3.SystemUtils.LINE_SEPARATOR:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
22: ldc " Error: "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 2
invokevirtual org.yaml.snakeyaml.error.YAMLException.getMessage:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
iconst_0
23: invokespecial org.apache.cassandra.exceptions.ConfigurationException.<init>:(Ljava/lang/String;Z)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 24 0 this Lorg/apache/cassandra/config/YamlConfigurationLoader;
0 24 1 url Ljava/net/URL;
4 5 2 configBytes [B
12 20 2 configBytes [B
3 6 5 is Ljava/io/InputStream;
11 12 3 e Ljava/io/IOException;
13 20 3 constructor Lorg/yaml/snakeyaml/constructor/Constructor;
14 20 4 propertiesChecker Lorg/apache/cassandra/config/YamlConfigurationLoader$PropertiesChecker;
16 20 5 yaml Lorg/yaml/snakeyaml/Yaml;
17 20 6 result Lorg/apache/cassandra/config/Config;
21 24 2 e Lorg/yaml/snakeyaml/error/YAMLException;
Exception table:
from to target type
3 4 5 any
2 7 7 any
1 10 10 Class java.io.IOException
0 19 20 Class org.yaml.snakeyaml.error.YAMLException
Exceptions:
throws org.apache.cassandra.exceptions.ConfigurationException
MethodParameters:
Name Flags
url
private org.apache.cassandra.config.Config loadConfig(org.yaml.snakeyaml.Yaml, byte[]);
descriptor: (Lorg/yaml/snakeyaml/Yaml;[B)Lorg/apache/cassandra/config/Config;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 1
new java.io.ByteArrayInputStream
dup
aload 2
invokespecial java.io.ByteArrayInputStream.<init>:([B)V
ldc Lorg/apache/cassandra/config/Config;
invokevirtual org.yaml.snakeyaml.Yaml.loadAs:(Ljava/io/InputStream;Ljava/lang/Class;)Ljava/lang/Object;
checkcast org.apache.cassandra.config.Config
astore 3
start local 3 1: aload 3
ifnonnull 2
new org.apache.cassandra.config.Config
dup
invokespecial org.apache.cassandra.config.Config.<init>:()V
goto 3
StackMap locals: org.apache.cassandra.config.Config
StackMap stack:
2: aload 3
StackMap locals:
StackMap stack: org.apache.cassandra.config.Config
3: areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/apache/cassandra/config/YamlConfigurationLoader;
0 4 1 yaml Lorg/yaml/snakeyaml/Yaml;
0 4 2 configBytes [B
1 4 3 config Lorg/apache/cassandra/config/Config;
MethodParameters:
Name Flags
yaml
configBytes
}
SourceFile: "YamlConfigurationLoader.java"
NestMembers:
org.apache.cassandra.config.YamlConfigurationLoader$CustomConstructor org.apache.cassandra.config.YamlConfigurationLoader$PropertiesChecker org.apache.cassandra.config.YamlConfigurationLoader$PropertiesChecker$1
InnerClasses:
CustomConstructor = org.apache.cassandra.config.YamlConfigurationLoader$CustomConstructor of org.apache.cassandra.config.YamlConfigurationLoader
private PropertiesChecker = org.apache.cassandra.config.YamlConfigurationLoader$PropertiesChecker of org.apache.cassandra.config.YamlConfigurationLoader