use of com.ms.silverking.cloud.dht.daemon.storage.convergence.RingIDAndVersionPair in project SilverKing by Morgan-Stanley.
the class ChecksumTreeDebug method main.
public static void main(String[] args) {
try {
if (args.length < 8) {
System.out.println("args: <gridConfig> <sourceIP> <namespace> <dhtConfigVersion> <ringName> <sourceRing> <targetRing> <ringRegion> [dataVersion]");
} else {
ChecksumTreeDebug ctd;
SKGridConfiguration gc;
IPAndPort sourceNode;
long namespace;
int dhtConfigVersion;
RingID ringID;
Pair<Long, Long> sourceRing;
Pair<Long, Long> targetRing;
ConvergencePoint sourceCP;
ConvergencePoint targetCP;
RingRegion ringRegion;
long dataVersion;
LWTPoolProvider.createDefaultWorkPools();
gc = SKGridConfiguration.parseFile(args[0]);
sourceNode = new IPAndPort(args[1], gc.getClientDHTConfiguration().getPort());
namespace = NamespaceUtil.nameToLong(args[2]);
dhtConfigVersion = Integer.parseInt(args[3]);
ringID = RingID.nameToRingID(args[4]);
sourceRing = getVersionPair(args[5]);
targetRing = getVersionPair(args[6]);
ringRegion = RingRegion.parseZKString(args[7]);
if (args.length >= 9) {
dataVersion = Long.parseLong(args[8]);
} else {
dataVersion = Long.MAX_VALUE;
}
sourceCP = new ConvergencePoint(dhtConfigVersion, new RingIDAndVersionPair(ringID, sourceRing), dataVersion);
targetCP = new ConvergencePoint(dhtConfigVersion, new RingIDAndVersionPair(ringID, targetRing), dataVersion);
ctd = new ChecksumTreeDebug();
ctd.debug(sourceNode, namespace, ringRegion, sourceCP, targetCP);
}
} catch (Exception e) {
e.printStackTrace();
}
}
Aggregations