public class org.apache.cassandra.cql3.statements.CreateKeyspaceStatement extends org.apache.cassandra.cql3.statements.SchemaAlteringStatement
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.cassandra.cql3.statements.CreateKeyspaceStatement
super_class: org.apache.cassandra.cql3.statements.SchemaAlteringStatement
{
private static final java.util.regex.Pattern PATTERN_WORD_CHARS;
descriptor: Ljava/util/regex/Pattern;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private final java.lang.String name;
descriptor: Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final org.apache.cassandra.cql3.statements.KeyspaceAttributes attrs;
descriptor: Lorg/apache/cassandra/cql3/statements/KeyspaceAttributes;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final boolean ifNotExists;
descriptor: Z
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc "\\w+"
invokestatic java.util.regex.Pattern.compile:(Ljava/lang/String;)Ljava/util/regex/Pattern;
putstatic org.apache.cassandra.cql3.statements.CreateKeyspaceStatement.PATTERN_WORD_CHARS:Ljava/util/regex/Pattern;
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(java.lang.String, org.apache.cassandra.cql3.statements.KeyspaceAttributes, boolean);
descriptor: (Ljava/lang/String;Lorg/apache/cassandra/cql3/statements/KeyspaceAttributes;Z)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokespecial org.apache.cassandra.cql3.statements.SchemaAlteringStatement.<init>:()V
1: aload 0
aload 1
putfield org.apache.cassandra.cql3.statements.CreateKeyspaceStatement.name:Ljava/lang/String;
2: aload 0
aload 2
putfield org.apache.cassandra.cql3.statements.CreateKeyspaceStatement.attrs:Lorg/apache/cassandra/cql3/statements/KeyspaceAttributes;
3: aload 0
iload 3
putfield org.apache.cassandra.cql3.statements.CreateKeyspaceStatement.ifNotExists:Z
4: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/apache/cassandra/cql3/statements/CreateKeyspaceStatement;
0 5 1 name Ljava/lang/String;
0 5 2 attrs Lorg/apache/cassandra/cql3/statements/KeyspaceAttributes;
0 5 3 ifNotExists Z
MethodParameters:
Name Flags
name
attrs
ifNotExists
public java.lang.String keyspace();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.cql3.statements.CreateKeyspaceStatement.name:Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/cql3/statements/CreateKeyspaceStatement;
public void checkAccess(org.apache.cassandra.service.ClientState);
descriptor: (Lorg/apache/cassandra/service/ClientState;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 1
getstatic org.apache.cassandra.auth.Permission.CREATE:Lorg/apache/cassandra/auth/Permission;
invokevirtual org.apache.cassandra.service.ClientState.hasAllKeyspacesAccess:(Lorg/apache/cassandra/auth/Permission;)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/cassandra/cql3/statements/CreateKeyspaceStatement;
0 2 1 state Lorg/apache/cassandra/service/ClientState;
Exceptions:
throws org.apache.cassandra.exceptions.UnauthorizedException
MethodParameters:
Name Flags
state
public void validate(org.apache.cassandra.service.ClientState);
descriptor: (Lorg/apache/cassandra/service/ClientState;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield org.apache.cassandra.cql3.statements.CreateKeyspaceStatement.name:Ljava/lang/String;
invokestatic org.apache.cassandra.thrift.ThriftValidation.validateKeyspaceNotSystem:(Ljava/lang/String;)V
1: getstatic org.apache.cassandra.cql3.statements.CreateKeyspaceStatement.PATTERN_WORD_CHARS:Ljava/util/regex/Pattern;
aload 0
getfield org.apache.cassandra.cql3.statements.CreateKeyspaceStatement.name:Ljava/lang/String;
invokevirtual java.util.regex.Pattern.matcher:(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
invokevirtual java.util.regex.Matcher.matches:()Z
ifne 3
2: new org.apache.cassandra.exceptions.InvalidRequestException
dup
ldc "\"%s\" is not a valid keyspace name"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield org.apache.cassandra.cql3.statements.CreateKeyspaceStatement.name:Ljava/lang/String;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.cql3.statements.CreateKeyspaceStatement.name:Ljava/lang/String;
invokevirtual java.lang.String.length:()I
bipush 48
if_icmple 5
4: new org.apache.cassandra.exceptions.InvalidRequestException
dup
ldc "Keyspace names shouldn't be more than %s characters long (got \"%s\")"
iconst_2
anewarray java.lang.Object
dup
iconst_0
bipush 48
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_1
aload 0
getfield org.apache.cassandra.cql3.statements.CreateKeyspaceStatement.name:Ljava/lang/String;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.cql3.statements.CreateKeyspaceStatement.attrs:Lorg/apache/cassandra/cql3/statements/KeyspaceAttributes;
invokevirtual org.apache.cassandra.cql3.statements.KeyspaceAttributes.validate:()V
6: aload 0
getfield org.apache.cassandra.cql3.statements.CreateKeyspaceStatement.attrs:Lorg/apache/cassandra/cql3/statements/KeyspaceAttributes;
invokevirtual org.apache.cassandra.cql3.statements.KeyspaceAttributes.getReplicationStrategyClass:()Ljava/lang/String;
ifnonnull 8
7: new org.apache.cassandra.exceptions.ConfigurationException
dup
ldc "Missing mandatory replication strategy class"
invokespecial org.apache.cassandra.exceptions.ConfigurationException.<init>:(Ljava/lang/String;)V
athrow
8: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.cql3.statements.CreateKeyspaceStatement.attrs:Lorg/apache/cassandra/cql3/statements/KeyspaceAttributes;
invokevirtual org.apache.cassandra.cql3.statements.KeyspaceAttributes.asNewKeyspaceParams:()Lorg/apache/cassandra/schema/KeyspaceParams;
astore 2
start local 2 9: aload 2
aload 0
getfield org.apache.cassandra.cql3.statements.CreateKeyspaceStatement.name:Ljava/lang/String;
invokevirtual org.apache.cassandra.schema.KeyspaceParams.validate:(Ljava/lang/String;)V
10: aload 2
getfield org.apache.cassandra.schema.KeyspaceParams.replication:Lorg/apache/cassandra/schema/ReplicationParams;
getfield org.apache.cassandra.schema.ReplicationParams.klass:Ljava/lang/Class;
ldc Lorg/apache/cassandra/locator/LocalStrategy;
invokevirtual java.lang.Object.equals:(Ljava/lang/Object;)Z
ifeq 12
11: new org.apache.cassandra.exceptions.ConfigurationException
dup
ldc "Unable to use given strategy class: LocalStrategy is reserved for internal use."
invokespecial org.apache.cassandra.exceptions.ConfigurationException.<init>:(Ljava/lang/String;)V
athrow
12: StackMap locals: org.apache.cassandra.schema.KeyspaceParams
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lorg/apache/cassandra/cql3/statements/CreateKeyspaceStatement;
0 13 1 state Lorg/apache/cassandra/service/ClientState;
9 13 2 params Lorg/apache/cassandra/schema/KeyspaceParams;
Exceptions:
throws org.apache.cassandra.exceptions.RequestValidationException
MethodParameters:
Name Flags
state
public org.apache.cassandra.transport.Event$SchemaChange announceMigration(org.apache.cassandra.service.QueryState, boolean);
descriptor: (Lorg/apache/cassandra/service/QueryState;Z)Lorg/apache/cassandra/transport/Event$SchemaChange;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=5, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield org.apache.cassandra.cql3.statements.CreateKeyspaceStatement.name:Ljava/lang/String;
aload 0
getfield org.apache.cassandra.cql3.statements.CreateKeyspaceStatement.attrs:Lorg/apache/cassandra/cql3/statements/KeyspaceAttributes;
invokevirtual org.apache.cassandra.cql3.statements.KeyspaceAttributes.asNewKeyspaceParams:()Lorg/apache/cassandra/schema/KeyspaceParams;
invokestatic org.apache.cassandra.schema.KeyspaceMetadata.create:(Ljava/lang/String;Lorg/apache/cassandra/schema/KeyspaceParams;)Lorg/apache/cassandra/schema/KeyspaceMetadata;
astore 3
start local 3 1: aload 3
iload 2
invokestatic org.apache.cassandra.service.MigrationManager.announceNewKeyspace:(Lorg/apache/cassandra/schema/KeyspaceMetadata;Z)V
2: new org.apache.cassandra.transport.Event$SchemaChange
dup
getstatic org.apache.cassandra.transport.Event$SchemaChange$Change.CREATED:Lorg/apache/cassandra/transport/Event$SchemaChange$Change;
aload 0
invokevirtual org.apache.cassandra.cql3.statements.CreateKeyspaceStatement.keyspace:()Ljava/lang/String;
invokespecial org.apache.cassandra.transport.Event$SchemaChange.<init>:(Lorg/apache/cassandra/transport/Event$SchemaChange$Change;Ljava/lang/String;)V
3: areturn
4: StackMap locals: org.apache.cassandra.cql3.statements.CreateKeyspaceStatement org.apache.cassandra.service.QueryState int org.apache.cassandra.schema.KeyspaceMetadata
StackMap stack: org.apache.cassandra.exceptions.AlreadyExistsException
astore 4
start local 4 5: aload 0
getfield org.apache.cassandra.cql3.statements.CreateKeyspaceStatement.ifNotExists:Z
ifeq 7
6: aconst_null
areturn
7: StackMap locals: org.apache.cassandra.exceptions.AlreadyExistsException
StackMap stack:
aload 4
athrow
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/apache/cassandra/cql3/statements/CreateKeyspaceStatement;
0 8 1 queryState Lorg/apache/cassandra/service/QueryState;
0 8 2 isLocalOnly Z
1 8 3 ksm Lorg/apache/cassandra/schema/KeyspaceMetadata;
5 8 4 e Lorg/apache/cassandra/exceptions/AlreadyExistsException;
Exception table:
from to target type
1 3 4 Class org.apache.cassandra.exceptions.AlreadyExistsException
Exceptions:
throws org.apache.cassandra.exceptions.RequestValidationException
MethodParameters:
Name Flags
queryState
isLocalOnly
protected void grantPermissionsToCreator(org.apache.cassandra.service.QueryState);
descriptor: (Lorg/apache/cassandra/service/QueryState;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=5, locals=5, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual org.apache.cassandra.service.QueryState.getClientState:()Lorg/apache/cassandra/service/ClientState;
invokevirtual org.apache.cassandra.service.ClientState.getUser:()Lorg/apache/cassandra/auth/AuthenticatedUser;
invokevirtual org.apache.cassandra.auth.AuthenticatedUser.getName:()Ljava/lang/String;
invokestatic org.apache.cassandra.auth.RoleResource.role:(Ljava/lang/String;)Lorg/apache/cassandra/auth/RoleResource;
astore 2
start local 2 1: aload 0
invokevirtual org.apache.cassandra.cql3.statements.CreateKeyspaceStatement.keyspace:()Ljava/lang/String;
invokestatic org.apache.cassandra.auth.DataResource.keyspace:(Ljava/lang/String;)Lorg/apache/cassandra/auth/DataResource;
astore 3
start local 3 2: invokestatic org.apache.cassandra.config.DatabaseDescriptor.getAuthorizer:()Lorg/apache/cassandra/auth/IAuthorizer;
getstatic org.apache.cassandra.auth.AuthenticatedUser.SYSTEM_USER:Lorg/apache/cassandra/auth/AuthenticatedUser;
3: aload 3
invokevirtual org.apache.cassandra.auth.DataResource.applicablePermissions:()Ljava/util/Set;
4: aload 3
5: aload 2
6: invokeinterface org.apache.cassandra.auth.IAuthorizer.grant:(Lorg/apache/cassandra/auth/AuthenticatedUser;Ljava/util/Set;Lorg/apache/cassandra/auth/IResource;Lorg/apache/cassandra/auth/RoleResource;)V
7: aload 0
invokevirtual org.apache.cassandra.cql3.statements.CreateKeyspaceStatement.keyspace:()Ljava/lang/String;
invokestatic org.apache.cassandra.auth.FunctionResource.keyspace:(Ljava/lang/String;)Lorg/apache/cassandra/auth/FunctionResource;
astore 4
start local 4 8: invokestatic org.apache.cassandra.config.DatabaseDescriptor.getAuthorizer:()Lorg/apache/cassandra/auth/IAuthorizer;
getstatic org.apache.cassandra.auth.AuthenticatedUser.SYSTEM_USER:Lorg/apache/cassandra/auth/AuthenticatedUser;
9: aload 4
invokevirtual org.apache.cassandra.auth.FunctionResource.applicablePermissions:()Ljava/util/Set;
10: aload 4
11: aload 2
12: invokeinterface org.apache.cassandra.auth.IAuthorizer.grant:(Lorg/apache/cassandra/auth/AuthenticatedUser;Ljava/util/Set;Lorg/apache/cassandra/auth/IResource;Lorg/apache/cassandra/auth/RoleResource;)V
end local 4 end local 3 end local 2 13: goto 16
14: StackMap locals:
StackMap stack: org.apache.cassandra.exceptions.RequestExecutionException
astore 2
start local 2 15: new java.lang.RuntimeException
dup
aload 2
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 2 16: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 17 0 this Lorg/apache/cassandra/cql3/statements/CreateKeyspaceStatement;
0 17 1 state Lorg/apache/cassandra/service/QueryState;
1 13 2 role Lorg/apache/cassandra/auth/RoleResource;
2 13 3 keyspace Lorg/apache/cassandra/auth/DataResource;
8 13 4 functions Lorg/apache/cassandra/auth/FunctionResource;
15 16 2 e Lorg/apache/cassandra/exceptions/RequestExecutionException;
Exception table:
from to target type
0 13 14 Class org.apache.cassandra.exceptions.RequestExecutionException
MethodParameters:
Name Flags
state
}
SourceFile: "CreateKeyspaceStatement.java"
InnerClasses:
public SchemaChange = org.apache.cassandra.transport.Event$SchemaChange of org.apache.cassandra.transport.Event
public final Change = org.apache.cassandra.transport.Event$SchemaChange$Change of org.apache.cassandra.transport.Event$SchemaChange