/** * @return true if the procedure is finished successfully. */ public synchronized boolean isSuccess() { return state == ProcedureState.SUCCESS && !hasException(); }
protected synchronized RemoteProcedureException getException() { if (subprocStack != null) { for (Procedure<TEnvironment> proc: subprocStack) { if (proc.hasException()) { return proc.getException(); } } } return null; }
@Override protected void countDown(final Procedure proc) { if (proc.hasException()) { exception = MasterProcedureUtil.unwrapRemoteIOException(proc); } latch.countDown(); }
if (hasException()) { sb.append(", exception=" + getException());
if (proc.hasException()) { throw MasterProcedureUtil.unwrapRemoteIOException(proc); } else {
TableProcedureInterface iProcTable = (TableProcedureInterface) proc; boolean tableDeleted; if (proc.hasException()) { Exception procEx = proc.getException().unwrapRemoteException(); if (iProcTable.getTableOperationType() == TableOperationType.CREATE) {
if (proc.hasException()) { RemoteProcedureException exception = proc.getException(); builder.setException(
/** * @return true if the procedure is finished successfully. */ public synchronized boolean isSuccess() { return state == ProcedureState.SUCCESS && !hasException(); }
/** * @return true if the procedure is finished successfully. */ public synchronized boolean isSuccess() { return state == ProcedureState.SUCCESS && !hasException(); }
protected synchronized RemoteProcedureException getException() { if (subprocStack != null) { for (Procedure<TEnvironment> proc: subprocStack) { if (proc.hasException()) { return proc.getException(); } } } return null; }
protected synchronized RemoteProcedureException getException() { if (subprocStack != null) { for (Procedure proc: subprocStack) { if (proc.hasException()) { return proc.getException(); } } } return null; }
protected synchronized RemoteProcedureException getException() { if (subprocedures != null) { for (Procedure proc: subprocedures) { if (proc.hasException()) { return proc.getException(); } } } return null; }
protected void countDown(final Procedure proc) { if (proc.hasException()) { exception = proc.getException().unwrapRemoteException(); } latch.countDown(); }
if (hasException()) { sb.append(", exception=" + getException());
/** * Build the StringBuilder for the simple form of * procedure string. * @return the StringBuilder */ protected StringBuilder toStringSimpleSB() { final StringBuilder sb = new StringBuilder(); sb.append("pid="); sb.append(getProcId()); if (hasParent()) { sb.append(", ppid="); sb.append(getParentProcId()); } /** * TODO * Enable later when this is being used. * Currently owner not used. if (hasOwner()) { sb.append(", owner="); sb.append(getOwner()); }*/ sb.append(", state="); // pState for Procedure State as opposed to any other kind. toStringState(sb); if (hasException()) { sb.append(", exception=" + getException()); } sb.append("; "); toStringClassDetails(sb); return sb; }
@Override public void completionCleanup(Procedure proc) { if (proc instanceof TableProcedureInterface) { TableProcedureInterface iProcTable = (TableProcedureInterface)proc; boolean tableDeleted; if (proc.hasException()) { IOException procEx = proc.getException().unwrapRemoteException(); if (iProcTable.getTableOperationType() == TableOperationType.CREATE) { // create failed because the table already exist tableDeleted = !(procEx instanceof TableExistsException); } else { // the operation failed because the table does not exist tableDeleted = (procEx instanceof TableNotFoundException); } } else { // the table was deleted tableDeleted = (iProcTable.getTableOperationType() == TableOperationType.DELETE); } if (tableDeleted) { markTableAsDeleted(iProcTable.getTableName()); return; } } else { // No cleanup for ServerProcedureInterface types, yet. return; } }
/** * Helper to create the ProcedureInfo from Procedure. */ @InterfaceAudience.Private public static ProcedureInfo createProcedureInfo(final Procedure proc, final NonceKey nonceKey) { RemoteProcedureException exception = proc.hasException() ? proc.getException() : null; return new ProcedureInfo( proc.getProcId(), proc.toStringClass(), proc.getOwner(), proc.getState(), proc.hasParent() ? proc.getParentProcId() : -1, nonceKey, exception != null ? RemoteProcedureException.toProto(exception.getSource(), exception.getCause()) : null, proc.getLastUpdate(), proc.getStartTime(), proc.getResult()); }
if (proc.hasException()) { RemoteProcedureException exception = proc.getException(); builder.setException(
if (proc.hasException()) { RemoteProcedureException exception = proc.getException(); builder.setException(
if (proc.hasException()) { RemoteProcedureException exception = proc.getException(); builder.setException(