org.kairosdb.rollup.BalancingAlgorithm Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kairosdb Show documentation
Show all versions of kairosdb Show documentation
KairosDB is a fast distributed scalable time series abstraction on top of Cassandra.
package org.kairosdb.rollup;
import java.util.Map;
import java.util.Set;
public interface BalancingAlgorithm {
/**
* Returns balanced server assignments.
*
* @param hosts list of hosts
* @param scores mapping between task id and scores
* @return map of task id to host assigned
*/
Map rebalance(Set hosts, Map scores);
/**
* Returns an assignment mapping of task id to hostname for unassigned tasks.
*/
Map balance(Set hosts, Map currentAssignments, Map scores);
}