com.twitter.finagle.thrift.exp.partitioning
Gets the logical partition identifiers from a host identifier, host identifiers are derived from ZkMetadata shardId.
Gets the logical partition identifiers from a host identifier, host identifiers are derived from ZkMetadata shardId. Indicates which logical partitions a physical host belongs to, multiple hosts can belong to the same partition, and one host can belong to multiple partitions, for example:
val getLogicalPartition: Int => Seq[Int] = { case a if Range(0, 10).contains(a) => Seq(0, 1) case b if Range(10, 20).contains(b) => Seq(1) case c if Range(20, 30).contains(c) => Seq(2) case _ => throw ... }
If not provided, the default is that each instance is its own partition.
A PartialFunction implemented by client that provides the partitioning logic on a request.
A PartialFunction implemented by client that provides the partitioning logic on a request. It takes a Thrift object request, and returns Future Map of partition ids to sub-requests. If we don't need to fan-out, it should return one element: partition id to the original request. This PartialFunction can take multiple Thrift request types of one Thrift service (different method endpoints of one service).
The state that is used for deciding how to reshard the cluster.
A ResponseMergerRegistry implemented by client to supply ResponseMergers for message fan-out cases.
A ResponseMergerRegistry implemented by client to supply ResponseMergers for message fan-out cases.
ResponseMerger
An API to set a custom partitioning strategy for a Thrift/ThriftMux Client. For a Java-friendly way to do the same thing, see
ClientCustomStrategy.create