Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
class RackAwareReplicaSelector implements ReplicaSelector {


  Node select(String rackId, PartitionInfo partitionInfo) {
    // if rackId is not null, iterate through the online replicas 
    // if one or more exists, choose a replica randomly from them
    // otherwise return the current leader
  }
}

...