public class BatchlogEndpointSelector
extends java.lang.Object
Constructor and Description |
---|
BatchlogEndpointSelector(java.lang.String localRack) |
Modifier and Type | Method and Description |
---|---|
java.util.Collection<java.net.InetAddress> |
chooseEndpoints(com.google.common.collect.Multimap<java.lang.String,java.net.InetAddress> endpoints) |
protected int |
getRandomInt(int bound) |
protected boolean |
isValid(java.net.InetAddress input) |
public BatchlogEndpointSelector(java.lang.String localRack)
public java.util.Collection<java.net.InetAddress> chooseEndpoints(com.google.common.collect.Multimap<java.lang.String,java.net.InetAddress> endpoints)
endpoints
- nodes in the local datacenter, grouped by rack nameprotected boolean isValid(java.net.InetAddress input)
protected int getRandomInt(int bound)
Copyright © 2015 The Apache Software Foundation