use of com.yahoo.ycsb.RandomByteIterator in project YCSB by brianfrankcooper.
the class RestWorkload method doTransactionInsert.
@Override
public void doTransactionInsert(DB db) {
HashMap<String, ByteIterator> value = new HashMap<String, ByteIterator>();
// Create random bytes of insert data with a specific size.
value.put("data", new RandomByteIterator(fieldlengthgenerator.nextValue().longValue()));
db.insert(null, getNextURL(2), value);
}
use of com.yahoo.ycsb.RandomByteIterator in project YCSB by brianfrankcooper.
the class RestWorkload method doTransactionUpdate.
@Override
public void doTransactionUpdate(DB db) {
HashMap<String, ByteIterator> value = new HashMap<String, ByteIterator>();
// Create random bytes of update data with a specific size.
value.put("data", new RandomByteIterator(fieldlengthgenerator.nextValue().longValue()));
db.update(null, getNextURL(4), value);
}
Aggregations