use of org.apache.accumulo.core.client.MutationsRejectedException in project apex-malhar by apache.
the class AccumuloWindowStore method storeCommittedWindowId.
@Override
public void storeCommittedWindowId(String appId, int operatorId, long windowId) {
byte[] WindowIdBytes = toBytes(windowId);
String columnKey = appId + "_" + operatorId + "_" + lastWindowColumnName;
lastWindowColumnBytes = columnKey.getBytes();
Mutation mutation = new Mutation(rowBytes);
mutation.put(columnFamilyBytes, lastWindowColumnBytes, WindowIdBytes);
try {
batchwriter.addMutation(mutation);
batchwriter.flush();
} catch (MutationsRejectedException e) {
logger.error("error getting committed window id", e);
DTThrowable.rethrow(e);
}
}
use of org.apache.accumulo.core.client.MutationsRejectedException in project apex-malhar by apache.
the class AbstractAccumuloOutputOperator method storeAggregate.
@Override
public void storeAggregate() {
try {
for (T tuple : tuples) {
Mutation mutation = operationMutation(tuple);
store.getBatchwriter().addMutation(mutation);
}
store.getBatchwriter().flush();
} catch (MutationsRejectedException e) {
logger.error("unable to write mutations", e);
DTThrowable.rethrow(e);
}
tuples.clear();
}
Aggregations