public class SplitUtils extends Object
| Constructor and Description |
|---|
SplitUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Collection<InputLedger> |
getLedgersInBetween(String topic,
org.apache.pulsar.client.impl.MessageIdImpl start,
org.apache.pulsar.client.impl.MessageIdImpl end,
CachedClients cachedClients) |
static List<List<InputLedger>> |
partitionToNSplits(List<InputLedger> ledgers,
int parallelism)
Best effort partitioning based on ledger size (use backtracking method).
|
static long |
sizeOfLedgerList(List<InputLedger> ledgers) |
public static Collection<InputLedger> getLedgersInBetween(String topic, org.apache.pulsar.client.impl.MessageIdImpl start, org.apache.pulsar.client.impl.MessageIdImpl end, CachedClients cachedClients) throws Exception
Exceptionpublic static List<List<InputLedger>> partitionToNSplits(List<InputLedger> ledgers, int parallelism)
ledgers - The ledgers list to be partitioned.parallelism - The number of target partition.public static long sizeOfLedgerList(List<InputLedger> ledgers)
Copyright © 2019–2021 The Apache Software Foundation. All rights reserved.