net.myrrix.common
Class PartitionsUtils
java.lang.Object
net.myrrix.common.PartitionsUtils
public final class PartitionsUtils
- extends Object
Utility methods for dealing with partitions in distributed mode.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
parseAllPartitions
public static List<List<org.apache.mahout.common.Pair<String,Integer>>> parseAllPartitions(CharSequence value)
- Parameters:
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"
- Returns:
List of partitions, where each partition is a List of replicas, where each
replica is a host-port pair, as String and Integer
Copyright © 2012. All Rights Reserved.