public final class PartitionsUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static List<List<org.apache.mahout.common.Pair<String,Integer>>> |
getDefaultLocalPartition(int port) |
static List<List<org.apache.mahout.common.Pair<String,Integer>>> |
parseAllPartitions(CharSequence value) |
static List<List<org.apache.mahout.common.Pair<String,Integer>>> |
parsePartitionsFromStatus(URL url) |
public static List<List<org.apache.mahout.common.Pair<String,Integer>>> parseAllPartitions(CharSequence value)
value - describes all partitions, when partitioning across Serving Layers
by user. Each partition may have multiple replicas. Serving Layers are specified as "host:port".
Replicas are specified as many Serving Layers, separated by commas, like "rep1:port1,rep2:port2,...".
Finally, partitions are specified as multiple replicas separated by semicolon, like
"part1rep1:port11,part1rep2:port12;part2rep1:port21,part2rep2:port22;...". Example:
"foo:80,foo2:8080;bar:8080;baz2:80,baz3:80"List of partitions, where each partition is a List of replicas, where each
replica is a host-port pair, as String and Integerpublic static List<List<org.apache.mahout.common.Pair<String,Integer>>> getDefaultLocalPartition(int port)
port - port the instance is configured to run onpublic static List<List<org.apache.mahout.common.Pair<String,Integer>>> parsePartitionsFromStatus(URL url) throws IOException
IOExceptionCopyright © 2012. All Rights Reserved.