use of com.ms.silverking.cloud.dht.client.ChecksumType in project SilverKing by Morgan-Stanley.
the class MetaDataUtil method getChecksumLength.
private static int getChecksumLength(ByteBuffer storedValue, int baseOffset) {
ChecksumType checksumType;
checksumType = getChecksumType(storedValue, baseOffset);
return checksumType.length();
}
use of com.ms.silverking.cloud.dht.client.ChecksumType in project SilverKing by Morgan-Stanley.
the class DevTest method main.
/**
* @param args
*/
public static void main(String[] args) {
try {
if (args.length != 9) {
System.out.println("args: <zkLocs> <dhtName> <valueSize> <numKeys> <reps> <namespace> <compression> <checksum> <tests>");
return;
} else {
HostAndPort[] zkLocs;
String dhtName;
int valueSize;
int numKeys;
int reps;
String namespace;
Compression compression;
ChecksumType checksumType;
EnumSet<Test> tests;
LWTPoolProvider.createDefaultWorkPools();
zkLocs = HostAndPort.parseMultiple(args[0]);
dhtName = args[1];
valueSize = Integer.parseInt(args[2]);
numKeys = Integer.parseInt(args[3]);
reps = Integer.parseInt(args[4]);
namespace = args[5];
compression = Compression.valueOf(args[6]);
checksumType = ChecksumType.valueOf(args[7]);
tests = parseTests(args[8]);
// Log.setLevelAll();
new DevTest(zkLocs, dhtName, valueSize).test(numKeys, reps, namespace, compression, checksumType, tests);
// ThreadUtil.sleep(60000);
}
} catch (Exception e) {
e.printStackTrace();
}
}
Aggregations