new FileSplit(jsonFilePath,
0,
jsonFileStatus.getLen(),
(String[]) null));
PerformanceTest readWriteTest = new PerformanceTest() {
@Override
public void doOperation(int index) throws Exception {
try {
BytesWritable key = new BytesWritable();
BytesWritable value = new BytesWritable();
reader.next(key, value);
store.put(new ByteArray(ByteUtils.copy(key.get(), 0, key.getSize())),
Versioned.value(ByteUtils.copy(value.get(), 0, value.getSize())), null);
} catch(ObsoleteVersionException e) {
obsoletes.incrementAndGet();
}
}
};
readWriteTest.run(30 * 1000 * 1000, 1);
System.out.println("Bdb write throuhput with one thread:");
readWriteTest.printStats();
}