setAssociatedCellCount(other.getAssociatedCellCount()); if (other.hasNonce()) { setNonce(other.getNonce());
hash = (53 * hash) + getAssociatedCellCount(); if (hasNonce()) { hash = (37 * hash) + NONCE_FIELD_NUMBER; hash = (53 * hash) + hashLong(getNonce());
setAssociatedCellCount(other.getAssociatedCellCount()); if (other.hasNonce()) { setNonce(other.getNonce());
setAssociatedCellCount(other.getAssociatedCellCount()); if (other.hasNonce()) { setNonce(other.getNonce());
setAssociatedCellCount(other.getAssociatedCellCount()); if (other.hasNonce()) { setNonce(other.getNonce());
hash = (53 * hash) + getAssociatedCellCount(); if (hasNonce()) { hash = (37 * hash) + NONCE_FIELD_NUMBER; hash = (53 * hash) + hashLong(getNonce());
hash = (53 * hash) + getAssociatedCellCount(); if (hasNonce()) { hash = (37 * hash) + NONCE_FIELD_NUMBER; hash = (53 * hash) + hashLong(getNonce());
hash = (53 * hash) + getAssociatedCellCount(); if (hasNonce()) { hash = (37 * hash) + NONCE_FIELD_NUMBER; hash = (53 * hash) + hashLong(getNonce());
/** * Starts the nonce operation for a mutation, if needed. * @param mutation Mutation. * @param nonceGroup Nonce group from the request. * @returns Nonce used (can be NO_NONCE). */ private long startNonceOperation(final MutationProto mutation, long nonceGroup) throws IOException, OperationConflictException { if (regionServer.nonceManager == null || !mutation.hasNonce()) return HConstants.NO_NONCE; boolean canProceed = false; try { canProceed = regionServer.nonceManager.startOperation( nonceGroup, mutation.getNonce(), regionServer); } catch (InterruptedException ex) { throw new InterruptedIOException("Nonce start operation interrupted"); } if (!canProceed) { // TODO: instead, we could convert append/increment to get w/mvcc String message = "The operation with nonce {" + nonceGroup + ", " + mutation.getNonce() + "} on row [" + Bytes.toString(mutation.getRow().toByteArray()) + "] may have already completed"; throw new OperationConflictException(message); } return mutation.getNonce(); }
/** * Ends nonce operation for a mutation, if needed. * @param mutation Mutation. * @param nonceGroup Nonce group from the request. Always 0 in initial implementation. * @param success Whether the operation for this nonce has succeeded. */ private void endNonceOperation(final MutationProto mutation, long nonceGroup, boolean success) { if (regionServer.nonceManager != null && mutation.hasNonce()) { regionServer.nonceManager.endOperation(nonceGroup, mutation.getNonce(), success); } }