Repository: cassandra Updated Branches: refs/heads/trunk 54ae900a5 -> 48d4f6080
presize collection and fix duplicate assignment typo Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/48d4f608 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/48d4f608 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/48d4f608 Branch: refs/heads/trunk Commit: 48d4f6080d882f9d08561f64fdbb5ab91dea080d Parents: 54ae900 Author: Dave Brosius <[email protected]> Authored: Tue Aug 23 00:38:47 2016 -0400 Committer: Dave Brosius <[email protected]> Committed: Tue Aug 23 00:38:47 2016 -0400 ---------------------------------------------------------------------- src/java/org/apache/cassandra/db/SystemKeyspace.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/48d4f608/src/java/org/apache/cassandra/db/SystemKeyspace.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/db/SystemKeyspace.java b/src/java/org/apache/cassandra/db/SystemKeyspace.java index c204e0a..b23729e 100644 --- a/src/java/org/apache/cassandra/db/SystemKeyspace.java +++ b/src/java/org/apache/cassandra/db/SystemKeyspace.java @@ -33,6 +33,7 @@ import com.google.common.collect.HashMultimap; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.SetMultimap; +import com.google.common.collect.Sets; import com.google.common.io.ByteStreams; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -1331,8 +1332,8 @@ public final class SystemKeyspace for (UntypedResultSet.Row row : rs) { InetAddress peer = row.getInetAddress("peer"); - Set<ByteBuffer> rawRanges = rawRanges = row.getSet("ranges", BytesType.instance); - Set<Range<Token>> ranges = new HashSet<>(); + Set<ByteBuffer> rawRanges = row.getSet("ranges", BytesType.instance); + Set<Range<Token>> ranges = Sets.newHashSetWithExpectedSize(rawRanges.size()); for (ByteBuffer rawRange : rawRanges) { ranges.add(byteBufferToRange(rawRange, partitioner));
