use of com.ms.silverking.cloud.dht.daemon.storage.DataSegmentWalkEntry in project SilverKing by Morgan-Stanley.
the class DataMigrationTool method walk.
public void walk(File nsDir, File ssDir, int segmentNumber) throws IOException {
ByteBuffer dataBuf;
DataSegmentWalker dsWalker;
NamespaceProperties nsProperties;
NamespaceOptions nsOptions;
nsProperties = NamespacePropertiesIO.read(nsDir);
nsOptions = nsProperties.getOptions();
dataBuf = FileSegment.getDataSegment(nsDir, segmentNumber, nsOptions.getSegmentSize());
dsWalker = new DataSegmentWalker(dataBuf);
while (dsWalker.hasNext()) {
DataSegmentWalkEntry entry;
entry = dsWalker.next();
System.out.println(entry.getOffset() + " " + entry);
migrateEntry(entry, ssDir);
}
}
Aggregations