use of org.apache.accumulo.core.data.thrift.TConditionalMutation in project accumulo by apache.
the class ConditionalWriterImpl method convertMutations.
private void convertMutations(TabletServerMutations<QCMutation> mutations, Map<Long, CMK> cmidToCm, MutableLong cmid, Map<TKeyExtent, List<TConditionalMutation>> tmutations, CompressedIterators compressedIters) {
for (Entry<KeyExtent, List<QCMutation>> entry : mutations.getMutations().entrySet()) {
TKeyExtent tke = entry.getKey().toThrift();
ArrayList<TConditionalMutation> tcondMutaions = new ArrayList<>();
List<QCMutation> condMutations = entry.getValue();
for (QCMutation cm : condMutations) {
TMutation tm = cm.toThrift();
List<TCondition> conditions = convertConditions(cm, compressedIters);
cmidToCm.put(cmid.longValue(), new CMK(entry.getKey(), cm));
TConditionalMutation tcm = new TConditionalMutation(conditions, tm, cmid.longValue());
cmid.increment();
tcondMutaions.add(tcm);
}
tmutations.put(tke, tcondMutaions);
}
}
Aggregations