cassandra-pr mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdeggleston <...@git.apache.org>
Subject [GitHub] cassandra pull request #224: 14405 replicas
Date Thu, 17 May 2018 22:15:03 GMT
Github user bdeggleston commented on a diff in the pull request:

    https://github.com/apache/cassandra/pull/224#discussion_r189117060
  
    --- Diff: src/java/org/apache/cassandra/service/reads/DataResolver.java ---
    @@ -30,21 +36,23 @@
     import org.apache.cassandra.db.rows.UnfilteredRowIterator;
     import org.apache.cassandra.db.rows.UnfilteredRowIterators;
     import org.apache.cassandra.db.transform.*;
    -import org.apache.cassandra.locator.InetAddressAndPort;
     import org.apache.cassandra.net.*;
     import org.apache.cassandra.schema.TableMetadata;
    -import org.apache.cassandra.service.reads.repair.ReadRepair;
     
     public class DataResolver extends ResponseResolver
     {
         private final long queryStartNanoTime;
         private final boolean enforceStrictLiveness;
    +    private final Map<InetAddressAndPort, Replica> replicaMap;
     
    -    public DataResolver(Keyspace keyspace, ReadCommand command, ConsistencyLevel consistency,
int maxResponseCount, long queryStartNanoTime, ReadRepair readRepair)
    +    public DataResolver(Keyspace keyspace, ReadCommand command, ConsistencyLevel consistency,
Replicas replicas, int maxResponseCount, long queryStartNanoTime, ReadRepair readRepair)
         {
             super(keyspace, command, consistency, readRepair, maxResponseCount);
             this.queryStartNanoTime = queryStartNanoTime;
             this.enforceStrictLiveness = command.metadata().enforceStrictLiveness();
    +
    +        replicaMap = Maps.newHashMapWithExpectedSize(replicas.size());
    +        replicas.forEach(r -> replicaMap.put(r.getEndpoint(), r));
    --- End diff --
    
    fixed


---

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


Mime
View raw message