public class org.apache.cassandra.dht.tokenallocator.TokenAllocation
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.cassandra.dht.tokenallocator.TokenAllocation
super_class: java.lang.Object
{
private static final org.slf4j.Logger logger;
descriptor: Lorg/slf4j/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lorg/apache/cassandra/dht/tokenallocator/TokenAllocation;
invokestatic org.slf4j.LoggerFactory.getLogger:(Ljava/lang/Class;)Lorg/slf4j/Logger;
putstatic org.apache.cassandra.dht.tokenallocator.TokenAllocation.logger:Lorg/slf4j/Logger;
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/dht/tokenallocator/TokenAllocation;
public static java.util.Collection<org.apache.cassandra.dht.Token> allocateTokens(org.apache.cassandra.locator.TokenMetadata, org.apache.cassandra.locator.AbstractReplicationStrategy, java.net.InetAddress, int);
descriptor: (Lorg/apache/cassandra/locator/TokenMetadata;Lorg/apache/cassandra/locator/AbstractReplicationStrategy;Ljava/net/InetAddress;I)Ljava/util/Collection;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=9, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokevirtual org.apache.cassandra.locator.TokenMetadata.cloneOnlyTokenMap:()Lorg/apache/cassandra/locator/TokenMetadata;
astore 4
start local 4 1: aload 4
aload 1
aload 2
invokestatic org.apache.cassandra.dht.tokenallocator.TokenAllocation.getStrategy:(Lorg/apache/cassandra/locator/TokenMetadata;Lorg/apache/cassandra/locator/AbstractReplicationStrategy;Ljava/net/InetAddress;)Lorg/apache/cassandra/dht/tokenallocator/TokenAllocation$StrategyAdapter;
astore 5
start local 5 2: aload 0
aload 5
invokestatic org.apache.cassandra.dht.tokenallocator.TokenAllocation.create:(Lorg/apache/cassandra/locator/TokenMetadata;Lorg/apache/cassandra/dht/tokenallocator/TokenAllocation$StrategyAdapter;)Lorg/apache/cassandra/dht/tokenallocator/TokenAllocator;
aload 2
iload 3
invokeinterface org.apache.cassandra.dht.tokenallocator.TokenAllocator.addUnit:(Ljava/lang/Object;I)Ljava/util/Collection;
astore 6
start local 6 3: aload 0
aload 5
aload 6
invokestatic org.apache.cassandra.dht.tokenallocator.TokenAllocation.adjustForCrossDatacenterClashes:(Lorg/apache/cassandra/locator/TokenMetadata;Lorg/apache/cassandra/dht/tokenallocator/TokenAllocation$StrategyAdapter;Ljava/util/Collection;)Ljava/util/Collection;
astore 6
4: getstatic org.apache.cassandra.dht.tokenallocator.TokenAllocation.logger:Lorg/slf4j/Logger;
invokeinterface org.slf4j.Logger.isWarnEnabled:()Z
ifeq 13
5: getstatic org.apache.cassandra.dht.tokenallocator.TokenAllocation.logger:Lorg/slf4j/Logger;
ldc "Selected tokens {}"
aload 6
invokeinterface org.slf4j.Logger.warn:(Ljava/lang/String;Ljava/lang/Object;)V
6: aload 4
aload 1
aload 2
invokestatic org.apache.cassandra.dht.tokenallocator.TokenAllocation.replicatedOwnershipStats:(Lorg/apache/cassandra/locator/TokenMetadata;Lorg/apache/cassandra/locator/AbstractReplicationStrategy;Ljava/net/InetAddress;)Lorg/apache/commons/math3/stat/descriptive/SummaryStatistics;
astore 7
start local 7 7: aload 4
aload 6
aload 2
invokevirtual org.apache.cassandra.locator.TokenMetadata.updateNormalTokens:(Ljava/util/Collection;Ljava/net/InetAddress;)V
8: aload 4
aload 1
aload 2
invokestatic org.apache.cassandra.dht.tokenallocator.TokenAllocation.replicatedOwnershipStats:(Lorg/apache/cassandra/locator/TokenMetadata;Lorg/apache/cassandra/locator/AbstractReplicationStrategy;Ljava/net/InetAddress;)Lorg/apache/commons/math3/stat/descriptive/SummaryStatistics;
astore 8
start local 8 9: getstatic org.apache.cassandra.dht.tokenallocator.TokenAllocation.logger:Lorg/slf4j/Logger;
ldc "Replicated node load in datacentre before allocation {}"
aload 7
invokestatic org.apache.cassandra.dht.tokenallocator.TokenAllocation.statToString:(Lorg/apache/commons/math3/stat/descriptive/SummaryStatistics;)Ljava/lang/String;
invokeinterface org.slf4j.Logger.warn:(Ljava/lang/String;Ljava/lang/Object;)V
10: getstatic org.apache.cassandra.dht.tokenallocator.TokenAllocation.logger:Lorg/slf4j/Logger;
ldc "Replicated node load in datacentre after allocation {}"
aload 8
invokestatic org.apache.cassandra.dht.tokenallocator.TokenAllocation.statToString:(Lorg/apache/commons/math3/stat/descriptive/SummaryStatistics;)Ljava/lang/String;
invokeinterface org.slf4j.Logger.warn:(Ljava/lang/String;Ljava/lang/Object;)V
11: aload 8
invokevirtual org.apache.commons.math3.stat.descriptive.SummaryStatistics.getStandardDeviation:()D
aload 7
invokevirtual org.apache.commons.math3.stat.descriptive.SummaryStatistics.getStandardDeviation:()D
dcmpl
ifle 13
12: getstatic org.apache.cassandra.dht.tokenallocator.TokenAllocation.logger:Lorg/slf4j/Logger;
ldc "Unexpected growth in standard deviation after allocation."
invokeinterface org.slf4j.Logger.warn:(Ljava/lang/String;)V
end local 8 end local 7 13: StackMap locals: org.apache.cassandra.locator.TokenMetadata org.apache.cassandra.dht.tokenallocator.TokenAllocation$StrategyAdapter java.util.Collection
StackMap stack:
aload 6
areturn
end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 tokenMetadata Lorg/apache/cassandra/locator/TokenMetadata;
0 14 1 rs Lorg/apache/cassandra/locator/AbstractReplicationStrategy;
0 14 2 endpoint Ljava/net/InetAddress;
0 14 3 numTokens I
1 14 4 tokenMetadataCopy Lorg/apache/cassandra/locator/TokenMetadata;
2 14 5 strategy Lorg/apache/cassandra/dht/tokenallocator/TokenAllocation$StrategyAdapter;
3 14 6 tokens Ljava/util/Collection<Lorg/apache/cassandra/dht/Token;>;
7 13 7 os Lorg/apache/commons/math3/stat/descriptive/SummaryStatistics;
9 13 8 ns Lorg/apache/commons/math3/stat/descriptive/SummaryStatistics;
Signature: (Lorg/apache/cassandra/locator/TokenMetadata;Lorg/apache/cassandra/locator/AbstractReplicationStrategy;Ljava/net/InetAddress;I)Ljava/util/Collection<Lorg/apache/cassandra/dht/Token;>;
MethodParameters:
Name Flags
tokenMetadata final
rs final
endpoint final
numTokens
private static java.util.Collection<org.apache.cassandra.dht.Token> adjustForCrossDatacenterClashes(org.apache.cassandra.locator.TokenMetadata, org.apache.cassandra.dht.tokenallocator.TokenAllocation$StrategyAdapter, java.util.Collection<org.apache.cassandra.dht.Token>);
descriptor: (Lorg/apache/cassandra/locator/TokenMetadata;Lorg/apache/cassandra/dht/tokenallocator/TokenAllocation$StrategyAdapter;Ljava/util/Collection;)Ljava/util/Collection;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=7, locals=7, args_size=3
start local 0 start local 1 start local 2 0: aload 2
invokeinterface java.util.Collection.size:()I
invokestatic com.google.common.collect.Lists.newArrayListWithCapacity:(I)Ljava/util/ArrayList;
astore 3
start local 3 1: aload 2
invokeinterface java.util.Collection.iterator:()Ljava/util/Iterator;
astore 5
goto 10
StackMap locals: org.apache.cassandra.locator.TokenMetadata org.apache.cassandra.dht.tokenallocator.TokenAllocation$StrategyAdapter java.util.Collection java.util.List top java.util.Iterator
StackMap stack:
2: aload 5
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.apache.cassandra.dht.Token
astore 4
start local 4 3: goto 8
4: StackMap locals: org.apache.cassandra.locator.TokenMetadata org.apache.cassandra.dht.tokenallocator.TokenAllocation$StrategyAdapter java.util.Collection java.util.List org.apache.cassandra.dht.Token java.util.Iterator
StackMap stack:
aload 0
aload 4
invokevirtual org.apache.cassandra.locator.TokenMetadata.getEndpoint:(Lorg/apache/cassandra/dht/Token;)Ljava/net/InetAddress;
astore 6
start local 6 5: aload 1
aload 6
invokeinterface org.apache.cassandra.dht.tokenallocator.TokenAllocation$StrategyAdapter.inAllocationRing:(Ljava/net/InetAddress;)Z
ifeq 7
6: new org.apache.cassandra.exceptions.ConfigurationException
dup
ldc "Allocated token %s already assigned to node %s. Is another node also allocating tokens?"
iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 4
aastore
dup
iconst_1
aload 6
aastore
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
7: StackMap locals: java.net.InetAddress
StackMap stack:
aload 4
invokevirtual org.apache.cassandra.dht.Token.increaseSlightly:()Lorg/apache/cassandra/dht/Token;
astore 4
end local 6 8: StackMap locals:
StackMap stack:
aload 0
aload 4
invokevirtual org.apache.cassandra.locator.TokenMetadata.getEndpoint:(Lorg/apache/cassandra/dht/Token;)Ljava/net/InetAddress;
ifnonnull 4
9: aload 3
aload 4
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 4 10: StackMap locals: org.apache.cassandra.locator.TokenMetadata org.apache.cassandra.dht.tokenallocator.TokenAllocation$StrategyAdapter java.util.Collection java.util.List top java.util.Iterator
StackMap stack:
aload 5
invokeinterface java.util.Iterator.hasNext:()Z
ifne 2
11: aload 3
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 tokenMetadata Lorg/apache/cassandra/locator/TokenMetadata;
0 12 1 strategy Lorg/apache/cassandra/dht/tokenallocator/TokenAllocation$StrategyAdapter;
0 12 2 tokens Ljava/util/Collection<Lorg/apache/cassandra/dht/Token;>;
1 12 3 filtered Ljava/util/List<Lorg/apache/cassandra/dht/Token;>;
3 10 4 t Lorg/apache/cassandra/dht/Token;
5 8 6 other Ljava/net/InetAddress;
Signature: (Lorg/apache/cassandra/locator/TokenMetadata;Lorg/apache/cassandra/dht/tokenallocator/TokenAllocation$StrategyAdapter;Ljava/util/Collection<Lorg/apache/cassandra/dht/Token;>;)Ljava/util/Collection<Lorg/apache/cassandra/dht/Token;>;
MethodParameters:
Name Flags
tokenMetadata final
strategy
tokens
public static java.util.Map<java.net.InetAddress, java.lang.Double> evaluateReplicatedOwnership(org.apache.cassandra.locator.TokenMetadata, org.apache.cassandra.locator.AbstractReplicationStrategy);
descriptor: (Lorg/apache/cassandra/locator/TokenMetadata;Lorg/apache/cassandra/locator/AbstractReplicationStrategy;)Ljava/util/Map;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=7, args_size=2
start local 0 start local 1 0: invokestatic com.google.common.collect.Maps.newHashMap:()Ljava/util/HashMap;
astore 2
start local 2 1: aload 0
invokevirtual org.apache.cassandra.locator.TokenMetadata.sortedTokens:()Ljava/util/ArrayList;
astore 3
start local 3 2: aload 3
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 4
start local 4 3: aload 4
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.apache.cassandra.dht.Token
astore 5
start local 5 4: goto 8
5: StackMap locals: org.apache.cassandra.locator.TokenMetadata org.apache.cassandra.locator.AbstractReplicationStrategy java.util.Map java.util.List java.util.Iterator org.apache.cassandra.dht.Token
StackMap stack:
aload 4
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.apache.cassandra.dht.Token
astore 6
start local 6 6: aload 0
aload 1
aload 5
aload 6
aload 2
invokestatic org.apache.cassandra.dht.tokenallocator.TokenAllocation.addOwnership:(Lorg/apache/cassandra/locator/TokenMetadata;Lorg/apache/cassandra/locator/AbstractReplicationStrategy;Lorg/apache/cassandra/dht/Token;Lorg/apache/cassandra/dht/Token;Ljava/util/Map;)V
7: aload 6
astore 5
end local 6 8: StackMap locals:
StackMap stack:
aload 4
invokeinterface java.util.Iterator.hasNext:()Z
ifne 5
9: aload 0
aload 1
aload 5
aload 3
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast org.apache.cassandra.dht.Token
aload 2
invokestatic org.apache.cassandra.dht.tokenallocator.TokenAllocation.addOwnership:(Lorg/apache/cassandra/locator/TokenMetadata;Lorg/apache/cassandra/locator/AbstractReplicationStrategy;Lorg/apache/cassandra/dht/Token;Lorg/apache/cassandra/dht/Token;Ljava/util/Map;)V
10: aload 2
areturn
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 tokenMetadata Lorg/apache/cassandra/locator/TokenMetadata;
0 11 1 rs Lorg/apache/cassandra/locator/AbstractReplicationStrategy;
1 11 2 ownership Ljava/util/Map<Ljava/net/InetAddress;Ljava/lang/Double;>;
2 11 3 sortedTokens Ljava/util/List<Lorg/apache/cassandra/dht/Token;>;
3 11 4 it Ljava/util/Iterator<Lorg/apache/cassandra/dht/Token;>;
4 11 5 current Lorg/apache/cassandra/dht/Token;
6 8 6 next Lorg/apache/cassandra/dht/Token;
Signature: (Lorg/apache/cassandra/locator/TokenMetadata;Lorg/apache/cassandra/locator/AbstractReplicationStrategy;)Ljava/util/Map<Ljava/net/InetAddress;Ljava/lang/Double;>;
MethodParameters:
Name Flags
tokenMetadata
rs
static void addOwnership(org.apache.cassandra.locator.TokenMetadata, org.apache.cassandra.locator.AbstractReplicationStrategy, org.apache.cassandra.dht.Token, org.apache.cassandra.dht.Token, java.util.Map<java.net.InetAddress, java.lang.Double>);
descriptor: (Lorg/apache/cassandra/locator/TokenMetadata;Lorg/apache/cassandra/locator/AbstractReplicationStrategy;Lorg/apache/cassandra/dht/Token;Lorg/apache/cassandra/dht/Token;Ljava/util/Map;)V
flags: (0x0008) ACC_STATIC
Code:
stack=6, locals=11, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: aload 2
aload 3
invokevirtual org.apache.cassandra.dht.Token.size:(Lorg/apache/cassandra/dht/Token;)D
dstore 5
start local 5 1: aload 2
invokevirtual org.apache.cassandra.dht.Token.getPartitioner:()Lorg/apache/cassandra/dht/IPartitioner;
aload 2
aload 3
invokeinterface org.apache.cassandra.dht.IPartitioner.midpoint:(Lorg/apache/cassandra/dht/Token;Lorg/apache/cassandra/dht/Token;)Lorg/apache/cassandra/dht/Token;
astore 7
start local 7 2: aload 1
aload 7
aload 0
invokevirtual org.apache.cassandra.locator.AbstractReplicationStrategy.calculateNaturalEndpoints:(Lorg/apache/cassandra/dht/Token;Lorg/apache/cassandra/locator/TokenMetadata;)Ljava/util/List;
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 9
goto 8
StackMap locals: org.apache.cassandra.locator.TokenMetadata org.apache.cassandra.locator.AbstractReplicationStrategy org.apache.cassandra.dht.Token org.apache.cassandra.dht.Token java.util.Map double org.apache.cassandra.dht.Token top java.util.Iterator
StackMap stack:
3: aload 9
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.net.InetAddress
astore 8
start local 8 4: aload 4
aload 8
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.lang.Double
astore 10
start local 10 5: aload 4
aload 8
aload 10
ifnull 6
aload 10
invokevirtual java.lang.Double.doubleValue:()D
dload 5
dadd
goto 7
StackMap locals: org.apache.cassandra.locator.TokenMetadata org.apache.cassandra.locator.AbstractReplicationStrategy org.apache.cassandra.dht.Token org.apache.cassandra.dht.Token java.util.Map double org.apache.cassandra.dht.Token java.net.InetAddress java.util.Iterator java.lang.Double
StackMap stack: java.util.Map java.net.InetAddress
6: dload 5
StackMap locals: org.apache.cassandra.locator.TokenMetadata org.apache.cassandra.locator.AbstractReplicationStrategy org.apache.cassandra.dht.Token org.apache.cassandra.dht.Token java.util.Map double org.apache.cassandra.dht.Token java.net.InetAddress java.util.Iterator java.lang.Double
StackMap stack: java.util.Map java.net.InetAddress double
7: invokestatic java.lang.Double.valueOf:(D)Ljava/lang/Double;
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
end local 10 end local 8 8: StackMap locals: org.apache.cassandra.locator.TokenMetadata org.apache.cassandra.locator.AbstractReplicationStrategy org.apache.cassandra.dht.Token org.apache.cassandra.dht.Token java.util.Map double org.apache.cassandra.dht.Token top java.util.Iterator
StackMap stack:
aload 9
invokeinterface java.util.Iterator.hasNext:()Z
ifne 3
9: return
end local 7 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 tokenMetadata Lorg/apache/cassandra/locator/TokenMetadata;
0 10 1 rs Lorg/apache/cassandra/locator/AbstractReplicationStrategy;
0 10 2 current Lorg/apache/cassandra/dht/Token;
0 10 3 next Lorg/apache/cassandra/dht/Token;
0 10 4 ownership Ljava/util/Map<Ljava/net/InetAddress;Ljava/lang/Double;>;
1 10 5 size D
2 10 7 representative Lorg/apache/cassandra/dht/Token;
4 8 8 n Ljava/net/InetAddress;
5 8 10 v Ljava/lang/Double;
Signature: (Lorg/apache/cassandra/locator/TokenMetadata;Lorg/apache/cassandra/locator/AbstractReplicationStrategy;Lorg/apache/cassandra/dht/Token;Lorg/apache/cassandra/dht/Token;Ljava/util/Map<Ljava/net/InetAddress;Ljava/lang/Double;>;)V
MethodParameters:
Name Flags
tokenMetadata final
rs final
current
next
ownership
public static java.lang.String statToString(org.apache.commons.math3.stat.descriptive.SummaryStatistics);
descriptor: (Lorg/apache/commons/math3/stat/descriptive/SummaryStatistics;)Ljava/lang/String;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=8, locals=1, args_size=1
start local 0 0: ldc "max %.2f min %.2f stddev %.4f"
iconst_3
anewarray java.lang.Object
dup
iconst_0
aload 0
invokevirtual org.apache.commons.math3.stat.descriptive.SummaryStatistics.getMax:()D
aload 0
invokevirtual org.apache.commons.math3.stat.descriptive.SummaryStatistics.getMean:()D
ddiv
invokestatic java.lang.Double.valueOf:(D)Ljava/lang/Double;
aastore
dup
iconst_1
aload 0
invokevirtual org.apache.commons.math3.stat.descriptive.SummaryStatistics.getMin:()D
aload 0
invokevirtual org.apache.commons.math3.stat.descriptive.SummaryStatistics.getMean:()D
ddiv
invokestatic java.lang.Double.valueOf:(D)Ljava/lang/Double;
aastore
dup
iconst_2
aload 0
invokevirtual org.apache.commons.math3.stat.descriptive.SummaryStatistics.getStandardDeviation:()D
invokestatic java.lang.Double.valueOf:(D)Ljava/lang/Double;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 stat Lorg/apache/commons/math3/stat/descriptive/SummaryStatistics;
MethodParameters:
Name Flags
stat
public static org.apache.commons.math3.stat.descriptive.SummaryStatistics replicatedOwnershipStats(org.apache.cassandra.locator.TokenMetadata, org.apache.cassandra.locator.AbstractReplicationStrategy, java.net.InetAddress);
descriptor: (Lorg/apache/cassandra/locator/TokenMetadata;Lorg/apache/cassandra/locator/AbstractReplicationStrategy;Ljava/net/InetAddress;)Lorg/apache/commons/math3/stat/descriptive/SummaryStatistics;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=7, args_size=3
start local 0 start local 1 start local 2 0: new org.apache.commons.math3.stat.descriptive.SummaryStatistics
dup
invokespecial org.apache.commons.math3.stat.descriptive.SummaryStatistics.<init>:()V
astore 3
start local 3 1: aload 0
aload 1
aload 2
invokestatic org.apache.cassandra.dht.tokenallocator.TokenAllocation.getStrategy:(Lorg/apache/cassandra/locator/TokenMetadata;Lorg/apache/cassandra/locator/AbstractReplicationStrategy;Ljava/net/InetAddress;)Lorg/apache/cassandra/dht/tokenallocator/TokenAllocation$StrategyAdapter;
astore 4
start local 4 2: aload 0
aload 1
invokestatic org.apache.cassandra.dht.tokenallocator.TokenAllocation.evaluateReplicatedOwnership:(Lorg/apache/cassandra/locator/TokenMetadata;Lorg/apache/cassandra/locator/AbstractReplicationStrategy;)Ljava/util/Map;
invokeinterface java.util.Map.entrySet:()Ljava/util/Set;
invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
astore 6
goto 6
StackMap locals: org.apache.cassandra.locator.TokenMetadata org.apache.cassandra.locator.AbstractReplicationStrategy java.net.InetAddress org.apache.commons.math3.stat.descriptive.SummaryStatistics org.apache.cassandra.dht.tokenallocator.TokenAllocation$StrategyAdapter top java.util.Iterator
StackMap stack:
3: aload 6
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.util.Map$Entry
astore 5
start local 5 4: aload 4
aload 5
invokeinterface java.util.Map$Entry.getKey:()Ljava/lang/Object;
checkcast java.net.InetAddress
invokeinterface org.apache.cassandra.dht.tokenallocator.TokenAllocation$StrategyAdapter.inAllocationRing:(Ljava/net/InetAddress;)Z
ifeq 6
5: aload 3
aload 5
invokeinterface java.util.Map$Entry.getValue:()Ljava/lang/Object;
checkcast java.lang.Double
invokevirtual java.lang.Double.doubleValue:()D
aload 0
aload 5
invokeinterface java.util.Map$Entry.getKey:()Ljava/lang/Object;
checkcast java.net.InetAddress
invokevirtual org.apache.cassandra.locator.TokenMetadata.getTokens:(Ljava/net/InetAddress;)Ljava/util/Collection;
invokeinterface java.util.Collection.size:()I
i2d
ddiv
invokevirtual org.apache.commons.math3.stat.descriptive.SummaryStatistics.addValue:(D)V
end local 5 6: StackMap locals:
StackMap stack:
aload 6
invokeinterface java.util.Iterator.hasNext:()Z
ifne 3
7: aload 3
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 tokenMetadata Lorg/apache/cassandra/locator/TokenMetadata;
0 8 1 rs Lorg/apache/cassandra/locator/AbstractReplicationStrategy;
0 8 2 endpoint Ljava/net/InetAddress;
1 8 3 stat Lorg/apache/commons/math3/stat/descriptive/SummaryStatistics;
2 8 4 strategy Lorg/apache/cassandra/dht/tokenallocator/TokenAllocation$StrategyAdapter;
4 6 5 en Ljava/util/Map$Entry<Ljava/net/InetAddress;Ljava/lang/Double;>;
MethodParameters:
Name Flags
tokenMetadata
rs
endpoint
static org.apache.cassandra.dht.tokenallocator.TokenAllocator<java.net.InetAddress> create(org.apache.cassandra.locator.TokenMetadata, org.apache.cassandra.dht.tokenallocator.TokenAllocation$StrategyAdapter);
descriptor: (Lorg/apache/cassandra/locator/TokenMetadata;Lorg/apache/cassandra/dht/tokenallocator/TokenAllocation$StrategyAdapter;)Lorg/apache/cassandra/dht/tokenallocator/TokenAllocator;
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=5, args_size=2
start local 0 start local 1 0: new java.util.TreeMap
dup
invokespecial java.util.TreeMap.<init>:()V
astore 2
start local 2 1: aload 0
invokevirtual org.apache.cassandra.locator.TokenMetadata.getNormalAndBootstrappingTokenToEndpointMap:()Ljava/util/Map;
invokeinterface java.util.Map.entrySet:()Ljava/util/Set;
invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
astore 4
goto 5
StackMap locals: org.apache.cassandra.locator.TokenMetadata org.apache.cassandra.dht.tokenallocator.TokenAllocation$StrategyAdapter java.util.NavigableMap top java.util.Iterator
StackMap stack:
2: aload 4
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.util.Map$Entry
astore 3
start local 3 3: aload 1
aload 3
invokeinterface java.util.Map$Entry.getValue:()Ljava/lang/Object;
checkcast java.net.InetAddress
invokeinterface org.apache.cassandra.dht.tokenallocator.TokenAllocation$StrategyAdapter.inAllocationRing:(Ljava/net/InetAddress;)Z
ifeq 5
4: aload 2
aload 3
invokeinterface java.util.Map$Entry.getKey:()Ljava/lang/Object;
checkcast org.apache.cassandra.dht.Token
aload 3
invokeinterface java.util.Map$Entry.getValue:()Ljava/lang/Object;
checkcast java.net.InetAddress
invokeinterface java.util.NavigableMap.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
end local 3 5: StackMap locals:
StackMap stack:
aload 4
invokeinterface java.util.Iterator.hasNext:()Z
ifne 2
6: aload 2
aload 1
aload 0
getfield org.apache.cassandra.locator.TokenMetadata.partitioner:Lorg/apache/cassandra/dht/IPartitioner;
invokestatic org.apache.cassandra.dht.tokenallocator.TokenAllocatorFactory.createTokenAllocator:(Ljava/util/NavigableMap;Lorg/apache/cassandra/dht/tokenallocator/ReplicationStrategy;Lorg/apache/cassandra/dht/IPartitioner;)Lorg/apache/cassandra/dht/tokenallocator/TokenAllocator;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 tokenMetadata Lorg/apache/cassandra/locator/TokenMetadata;
0 7 1 strategy Lorg/apache/cassandra/dht/tokenallocator/TokenAllocation$StrategyAdapter;
1 7 2 sortedTokens Ljava/util/NavigableMap<Lorg/apache/cassandra/dht/Token;Ljava/net/InetAddress;>;
3 5 3 en Ljava/util/Map$Entry<Lorg/apache/cassandra/dht/Token;Ljava/net/InetAddress;>;
Signature: (Lorg/apache/cassandra/locator/TokenMetadata;Lorg/apache/cassandra/dht/tokenallocator/TokenAllocation$StrategyAdapter;)Lorg/apache/cassandra/dht/tokenallocator/TokenAllocator<Ljava/net/InetAddress;>;
MethodParameters:
Name Flags
tokenMetadata
strategy
static org.apache.cassandra.dht.tokenallocator.TokenAllocation$StrategyAdapter getStrategy(org.apache.cassandra.locator.TokenMetadata, org.apache.cassandra.locator.AbstractReplicationStrategy, java.net.InetAddress);
descriptor: (Lorg/apache/cassandra/locator/TokenMetadata;Lorg/apache/cassandra/locator/AbstractReplicationStrategy;Ljava/net/InetAddress;)Lorg/apache/cassandra/dht/tokenallocator/TokenAllocation$StrategyAdapter;
flags: (0x0008) ACC_STATIC
Code:
stack=5, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 1
instanceof org.apache.cassandra.locator.NetworkTopologyStrategy
ifeq 2
1: aload 0
aload 1
checkcast org.apache.cassandra.locator.NetworkTopologyStrategy
aload 1
getfield org.apache.cassandra.locator.AbstractReplicationStrategy.snitch:Lorg/apache/cassandra/locator/IEndpointSnitch;
aload 2
invokestatic org.apache.cassandra.dht.tokenallocator.TokenAllocation.getStrategy:(Lorg/apache/cassandra/locator/TokenMetadata;Lorg/apache/cassandra/locator/NetworkTopologyStrategy;Lorg/apache/cassandra/locator/IEndpointSnitch;Ljava/net/InetAddress;)Lorg/apache/cassandra/dht/tokenallocator/TokenAllocation$StrategyAdapter;
areturn
2: StackMap locals:
StackMap stack:
aload 1
instanceof org.apache.cassandra.locator.SimpleStrategy
ifeq 4
3: aload 0
aload 1
checkcast org.apache.cassandra.locator.SimpleStrategy
aload 2
invokestatic org.apache.cassandra.dht.tokenallocator.TokenAllocation.getStrategy:(Lorg/apache/cassandra/locator/TokenMetadata;Lorg/apache/cassandra/locator/SimpleStrategy;Ljava/net/InetAddress;)Lorg/apache/cassandra/dht/tokenallocator/TokenAllocation$StrategyAdapter;
areturn
4: StackMap locals:
StackMap stack:
new org.apache.cassandra.exceptions.ConfigurationException
dup
new java.lang.StringBuilder
dup
ldc "Token allocation does not support replication strategy "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
invokevirtual java.lang.Class.getSimpleName:()Ljava/lang/String;
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 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 tokenMetadata Lorg/apache/cassandra/locator/TokenMetadata;
0 5 1 rs Lorg/apache/cassandra/locator/AbstractReplicationStrategy;
0 5 2 endpoint Ljava/net/InetAddress;
MethodParameters:
Name Flags
tokenMetadata final
rs final
endpoint final
static org.apache.cassandra.dht.tokenallocator.TokenAllocation$StrategyAdapter getStrategy(org.apache.cassandra.locator.TokenMetadata, org.apache.cassandra.locator.SimpleStrategy, java.net.InetAddress);
descriptor: (Lorg/apache/cassandra/locator/TokenMetadata;Lorg/apache/cassandra/locator/SimpleStrategy;Ljava/net/InetAddress;)Lorg/apache/cassandra/dht/tokenallocator/TokenAllocation$StrategyAdapter;
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 1
invokevirtual org.apache.cassandra.locator.SimpleStrategy.getReplicationFactor:()I
istore 3
start local 3 1: new org.apache.cassandra.dht.tokenallocator.TokenAllocation$1
dup
iload 3
invokespecial org.apache.cassandra.dht.tokenallocator.TokenAllocation$1.<init>:(I)V
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 tokenMetadata Lorg/apache/cassandra/locator/TokenMetadata;
0 2 1 rs Lorg/apache/cassandra/locator/SimpleStrategy;
0 2 2 endpoint Ljava/net/InetAddress;
1 2 3 replicas I
MethodParameters:
Name Flags
tokenMetadata final
rs final
endpoint final
static org.apache.cassandra.dht.tokenallocator.TokenAllocation$StrategyAdapter getStrategy(org.apache.cassandra.locator.TokenMetadata, org.apache.cassandra.locator.NetworkTopologyStrategy, org.apache.cassandra.locator.IEndpointSnitch, java.net.InetAddress);
descriptor: (Lorg/apache/cassandra/locator/TokenMetadata;Lorg/apache/cassandra/locator/NetworkTopologyStrategy;Lorg/apache/cassandra/locator/IEndpointSnitch;Ljava/net/InetAddress;)Lorg/apache/cassandra/dht/tokenallocator/TokenAllocation$StrategyAdapter;
flags: (0x0008) ACC_STATIC
Code:
stack=7, locals=8, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 2
aload 3
invokeinterface org.apache.cassandra.locator.IEndpointSnitch.getDatacenter:(Ljava/net/InetAddress;)Ljava/lang/String;
astore 4
start local 4 1: aload 1
aload 4
invokevirtual org.apache.cassandra.locator.NetworkTopologyStrategy.getReplicationFactor:(Ljava/lang/String;)I
istore 5
start local 5 2: iload 5
ifeq 3
iload 5
iconst_1
if_icmpne 4
3: StackMap locals: java.lang.String int
StackMap stack:
new org.apache.cassandra.dht.tokenallocator.TokenAllocation$2
dup
aload 4
aload 2
invokespecial org.apache.cassandra.dht.tokenallocator.TokenAllocation$2.<init>:(Ljava/lang/String;Lorg/apache/cassandra/locator/IEndpointSnitch;)V
areturn
4: StackMap locals:
StackMap stack:
aload 0
invokevirtual org.apache.cassandra.locator.TokenMetadata.getTopology:()Lorg/apache/cassandra/locator/TokenMetadata$Topology;
astore 6
start local 6 5: aload 6
invokevirtual org.apache.cassandra.locator.TokenMetadata$Topology.getDatacenterRacks:()Lcom/google/common/collect/ImmutableMap;
aload 4
invokevirtual com.google.common.collect.ImmutableMap.get:(Ljava/lang/Object;)Ljava/lang/Object;
ifnull 7
aload 6
invokevirtual org.apache.cassandra.locator.TokenMetadata$Topology.getDatacenterRacks:()Lcom/google/common/collect/ImmutableMap;
aload 4
invokevirtual com.google.common.collect.ImmutableMap.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast com.google.common.collect.ImmutableMultimap
aload 2
aload 3
invokeinterface org.apache.cassandra.locator.IEndpointSnitch.getRack:(Ljava/net/InetAddress;)Ljava/lang/String;
invokevirtual com.google.common.collect.ImmutableMultimap.containsKey:(Ljava/lang/Object;)Z
ifeq 7
6: aload 6
invokevirtual org.apache.cassandra.locator.TokenMetadata$Topology.getDatacenterRacks:()Lcom/google/common/collect/ImmutableMap;
aload 4
invokevirtual com.google.common.collect.ImmutableMap.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast com.google.common.collect.ImmutableMultimap
invokevirtual com.google.common.collect.ImmutableMultimap.asMap:()Lcom/google/common/collect/ImmutableMap;
invokevirtual com.google.common.collect.ImmutableMap.size:()I
goto 8
7: StackMap locals: org.apache.cassandra.locator.TokenMetadata$Topology
StackMap stack:
iconst_1
8: StackMap locals:
StackMap stack: int
istore 7
start local 7 9: iload 7
iload 5
if_icmplt 11
10: new org.apache.cassandra.dht.tokenallocator.TokenAllocation$3
dup
iload 5
aload 2
aload 4
invokespecial org.apache.cassandra.dht.tokenallocator.TokenAllocation$3.<init>:(ILorg/apache/cassandra/locator/IEndpointSnitch;Ljava/lang/String;)V
areturn
11: StackMap locals: int
StackMap stack:
iload 7
iconst_1
if_icmpne 13
12: new org.apache.cassandra.dht.tokenallocator.TokenAllocation$4
dup
iload 5
aload 4
aload 2
invokespecial org.apache.cassandra.dht.tokenallocator.TokenAllocation$4.<init>:(ILjava/lang/String;Lorg/apache/cassandra/locator/IEndpointSnitch;)V
areturn
13: StackMap locals:
StackMap stack:
new org.apache.cassandra.exceptions.ConfigurationException
dup
14: ldc "Token allocation failed: the number of racks %d in datacenter %s is lower than its replication factor %d."
iconst_3
anewarray java.lang.Object
dup
iconst_0
15: iload 7
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_1
aload 4
aastore
dup
iconst_2
iload 5
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
16: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
17: invokespecial org.apache.cassandra.exceptions.ConfigurationException.<init>:(Ljava/lang/String;)V
athrow
end local 7 end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 18 0 tokenMetadata Lorg/apache/cassandra/locator/TokenMetadata;
0 18 1 rs Lorg/apache/cassandra/locator/NetworkTopologyStrategy;
0 18 2 snitch Lorg/apache/cassandra/locator/IEndpointSnitch;
0 18 3 endpoint Ljava/net/InetAddress;
1 18 4 dc Ljava/lang/String;
2 18 5 replicas I
5 18 6 topology Lorg/apache/cassandra/locator/TokenMetadata$Topology;
9 18 7 racks I
MethodParameters:
Name Flags
tokenMetadata final
rs final
snitch final
endpoint final
}
SourceFile: "TokenAllocation.java"
NestMembers:
org.apache.cassandra.dht.tokenallocator.TokenAllocation$1 org.apache.cassandra.dht.tokenallocator.TokenAllocation$2 org.apache.cassandra.dht.tokenallocator.TokenAllocation$3 org.apache.cassandra.dht.tokenallocator.TokenAllocation$4 org.apache.cassandra.dht.tokenallocator.TokenAllocation$StrategyAdapter
InnerClasses:
public abstract Entry = java.util.Map$Entry of java.util.Map
org.apache.cassandra.dht.tokenallocator.TokenAllocation$1
org.apache.cassandra.dht.tokenallocator.TokenAllocation$2
org.apache.cassandra.dht.tokenallocator.TokenAllocation$3
org.apache.cassandra.dht.tokenallocator.TokenAllocation$4
abstract StrategyAdapter = org.apache.cassandra.dht.tokenallocator.TokenAllocation$StrategyAdapter of org.apache.cassandra.dht.tokenallocator.TokenAllocation
public Topology = org.apache.cassandra.locator.TokenMetadata$Topology of org.apache.cassandra.locator.TokenMetadata