rantav/hector — Issue #356: ColumnFamilyTemplate.createUpdater without parameters missing
Author: feestend
Created: 2011-12-01 08:19:42+00:00
State: open

Current ColumnFamilyTemplate implementation requires at least a key as parameter for the createUpdater method. Executing a batch update requires following awkward piece of code:

ColumnFamilyUpdater updater = cf.createUpdater(measList.get(0).getSessionId().toString());
updater.setByteBuffer(C_MEAS_DATA, measList.get(0).getData());
for (int i = 1; i < measList.size(); i++ ) {
updater.addKey(measList.get(i).getSessionId().toString());
updater.setByteBuffer(C_MEAS_DATA, measList.get(i).getData());
}
cf.update(updater);

Please provide a constructor with no parameter, so we can clean it up to:
ColumnFamilyUpdater updater = cf.createUpdater();
for (Measurement m : measList) {
updater.addKey(m.getSessionId().toString());
updater.setByteBuffer(C_MEAS_DATA, m.getData());
}
cf.update(updater);