public static class

AutoRebalanceStrategy.DefaultPlacementScheme

extends Object
implements AutoRebalanceStrategy.ReplicaPlacementScheme
java.lang.Object
   ↳ org.apache.helix.controller.strategy.AutoRebalanceStrategy.DefaultPlacementScheme

Class Overview

Compute preferred placements based on a default strategy that assigns replicas to nodes as evenly as possible while avoiding placing two replicas of the same partition on any node.

Summary

Public Constructors
AutoRebalanceStrategy.DefaultPlacementScheme()
Public Methods
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
void init(HelixManager manager)
Initialize global state
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.helix.controller.strategy.AutoRebalanceStrategy.ReplicaPlacementScheme

Public Constructors

public AutoRebalanceStrategy.DefaultPlacementScheme ()

Public Methods

public 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 void init (HelixManager manager)

Initialize global state

Parameters
manager The instance to which this placement is associated