public static interface

AutoRebalanceStrategy.ReplicaPlacementScheme

org.apache.helix.controller.strategy.AutoRebalanceStrategy.ReplicaPlacementScheme
Known Indirect Subclasses

Class Overview

Interface for providing a custom approach to computing a replica's affinity to a node.

Summary

Public Methods
abstract String getLocation(int partitionId, int replicaId, int numPartitions, int numReplicas, List<String> nodeNames)
Given properties of this replica, determine the node it would prefer to be served by
abstract void init(HelixManager manager)
Initialize global state

Public Methods

public abstract String getLocation (int partitionId, int replicaId, int numPartitions, int numReplicas, List<String> nodeNames)

Given properties of this replica, determine the node it would prefer to be served by

Parameters
partitionId The current partition
replicaId The current replica with respect to the current partition
numPartitions The total number of partitions
numReplicas The total number of replicas per partition
nodeNames A list of identifiers of all nodes, live and non-live
Returns
  • The name of the node that would prefer to serve this replica

public abstract void init (HelixManager manager)

Initialize global state

Parameters
manager The instance to which this placement is associated