@Override public void setStatus(long tid, org.apache.accumulo.fate.TStore.TStatus status) { store.setStatus(tid, status); switch (status) { case IN_PROGRESS: case FAILED_IN_PROGRESS: removeCandidate(tid); break; case FAILED: case SUCCESSFUL: addCandidate(tid); break; default: break; } }
case NEW: System.out.printf("Failing transaction: %016x (%s)%n", txid, ts); zs.setStatus(txid, TStatus.FAILED_IN_PROGRESS); state = true; break;
public void seedTransaction(long tid, Repo<T> repo, boolean autoCleanUp) { store.reserve(tid); try { if (store.getStatus(tid) == TStatus.NEW) { if (store.top(tid) == null) { try { store.push(tid, repo); } catch (StackOverflowException e) { // this should not happen throw new RuntimeException(e); } } if (autoCleanUp) store.setProperty(tid, AUTO_CLEAN_PROP, autoCleanUp); store.setProperty(tid, DEBUG_PROP, repo.getDescription()); store.setStatus(tid, TStatus.IN_PROGRESS); } } finally { store.unreserve(tid, 0); } }
@Override public void setStatus(long tid, org.apache.accumulo.fate.TStore.TStatus status) { store.setStatus(tid, status); switch (status) { case IN_PROGRESS: case FAILED_IN_PROGRESS: removeCandidate(tid); break; case FAILED: case SUCCESSFUL: addCandidate(tid); break; default: break; } }
case NEW: System.out.printf("Failing transaction: %016x (%s)%n", txid, ts); zs.setStatus(txid, TStatus.FAILED_IN_PROGRESS); state = true; break;
public void seedTransaction(long tid, Repo<T> repo, boolean autoCleanUp) { store.reserve(tid); try { if (store.getStatus(tid) == TStatus.NEW) { if (store.top(tid) == null) { try { store.push(tid, repo); } catch (StackOverflowException e) { // this should not happen throw new RuntimeException(e); } } if (autoCleanUp) store.setProperty(tid, AUTO_CLEAN_PROP, Boolean.valueOf(autoCleanUp)); store.setProperty(tid, DEBUG_PROP, repo.getDescription()); store.setStatus(tid, TStatus.IN_PROGRESS); } } finally { store.unreserve(tid, 0); } }