cassandra-pr mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From belliottsmith <...@git.apache.org>
Subject [GitHub] cassandra pull request #269: Review tr range movements
Date Tue, 18 Sep 2018 11:06:23 GMT
Github user belliottsmith commented on a diff in the pull request:

    https://github.com/apache/cassandra/pull/269#discussion_r218371266
  
    --- Diff: test/unit/org/apache/cassandra/dht/BootStrapperTest.java ---
    @@ -125,21 +125,19 @@ public boolean isAlive(InetAddressAndPort ep)
             s.addRanges(keyspaceName, Keyspace.open(keyspaceName).getReplicationStrategy().getPendingAddressRanges(tmd,
myToken, myEndpoint));
     
     
    -        Collection<Multimap<InetAddressAndPort, FetchReplica>> toFetch =
s.toFetch().get(keyspaceName);
    +        Multimap<InetAddressAndPort, FetchReplica> toFetch = s.toFetch().get(keyspaceName);
     
             // Check we get get RF new ranges in total
    -        long rangesCount = toFetch.stream()
    -               .map(Multimap::values)
    -               .flatMap(Collection::stream)
    -               .map(f -> f.remote)
    -               .map(Replica::range)
    -               .count();
    +        long rangesCount = toFetch.values().stream()
    --- End diff --
    
    surely we can just take toFetch.size()?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Mime
View raw message