private static boolean rollbackPrimary(Environment env, long startTs, PrimaryRowColumn prc,
byte[] lockValue) {
IteratorSetting iterConf = new IteratorSetting(10, PrewriteIterator.class);
PrewriteIterator.setSnaptime(iterConf, startTs);
ConditionalFlutation delLockMutation =
new ConditionalFlutation(env, prc.prow, new FluoCondition(env, prc.pcol).setIterators(
iterConf).setValue(lockValue));
delLockMutation.put(prc.pcol, ColumnConstants.DEL_LOCK_PREFIX | startTs,
DelLockValue.encode(prc.startTs, true, true));
ConditionalWriter cw = null;
cw = env.getSharedResources().getConditionalWriter();
try {
return cw.write(delLockMutation).getStatus() == Status.ACCEPTED;
} catch (AccumuloException e) {
throw new RuntimeException(e);
} catch (AccumuloSecurityException e) {
throw new RuntimeException(e);
}
}