Tabnine Logo
Procedure.setState
Code IndexAdd Tabnine to your IDE (free)

How to use
setState
method
in
org.apache.hadoop.hbase.procedure2.Procedure

Best Java code snippets using org.apache.hadoop.hbase.procedure2.Procedure.setState (Showing top 20 results out of 315)

origin: apache/hbase

protected synchronized void setFailure(final RemoteProcedureException exception) {
 this.exception = exception;
 if (!isFinished()) {
  setState(ProcedureState.FAILED);
 }
}
origin: apache/hbase

/**
 * Called by the ProcedureExecutor to assign the ID to the newly created procedure.
 */
@VisibleForTesting
protected void setProcId(long procId) {
 this.procId = procId;
 this.submittedTime = EnvironmentEdgeManager.currentTime();
 setState(ProcedureState.RUNNABLE);
}
origin: apache/hbase

/**
 * Try to set this procedure into RUNNABLE state.
 * Succeeds if all subprocedures/children are done.
 * @return True if we were able to move procedure to RUNNABLE state.
 */
synchronized boolean tryRunnable() {
 // Don't use isWaiting in the below; it returns true for WAITING and WAITING_TIMEOUT
 if (getState() == ProcedureState.WAITING && childrenCountDown()) {
  setState(ProcedureState.RUNNABLE);
  return true;
 } else {
  return false;
 }
}
origin: apache/hbase

procedure.setState(ProcedureState.RUNNABLE);
store.update(procedure);
origin: apache/hbase

private void cleanupAfterRollbackOneStep(Procedure<TEnvironment> proc) {
 if (proc.removeStackIndex()) {
  if (!proc.isSuccess()) {
   proc.setState(ProcedureState.ROLLEDBACK);
  }
  // update metrics on finishing the procedure (fail)
  proc.updateMetricsOnFinish(getEnvironment(), proc.elapsedTime(), false);
  if (proc.hasParent()) {
   store.delete(proc.getProcId());
   procedures.remove(proc.getProcId());
  } else {
   final long[] childProcIds = rollbackStack.get(proc.getProcId()).getSubprocedureIds();
   if (childProcIds != null) {
    store.delete(proc, childProcIds);
   } else {
    store.update(proc);
   }
  }
 } else {
  store.update(proc);
 }
}
origin: apache/hbase

 proc.setState(ProcedureState.RUNNABLE);
 runnableList.add(proc);
} else {
origin: apache/hbase

} else if (!suspended) {
 procedure.setState(ProcedureState.SUCCESS);
origin: apache/hbase

switch (procedure.getState()) {
 case RUNNABLE:
  procedure.setState(ProcedureState.WAITING);
  break;
 case WAITING_TIMEOUT:
origin: apache/hbase

proc.setState(proto.getState());
proc.setSubmittedTime(proto.getSubmittedTime());
proc.setLastUpdate(proto.getLastUpdate());
origin: com.aliyun.hbase/alihbase-procedure

protected synchronized void setFailure(final RemoteProcedureException exception) {
 this.exception = exception;
 if (!isFinished()) {
  setState(ProcedureState.FAILED);
 }
}
origin: org.apache.hbase/hbase-procedure

protected synchronized void setFailure(final RemoteProcedureException exception) {
 this.exception = exception;
 if (!isFinished()) {
  setState(ProcedureState.FAILED);
 }
}
origin: harbby/presto-connectors

protected synchronized void setFailure(final RemoteProcedureException exception) {
 this.exception = exception;
 if (!isFinished()) {
  setState(ProcedureState.FINISHED);
 }
}
origin: org.apache.hbase/hbase-procedure

/**
 * Called by the ProcedureExecutor to assign the ID to the newly created procedure.
 */
@VisibleForTesting
protected void setProcId(long procId) {
 this.procId = procId;
 this.submittedTime = EnvironmentEdgeManager.currentTime();
 setState(ProcedureState.RUNNABLE);
}
origin: com.aliyun.hbase/alihbase-procedure

/**
 * Try to set this procedure into RUNNABLE state.
 * Succeeds if all subprocedures/children are done.
 * @return True if we were able to move procedure to RUNNABLE state.
 */
synchronized boolean tryRunnable() {
 // Don't use isWaiting in the below; it returns true for WAITING and WAITING_TIMEOUT
 boolean b = getState() == ProcedureState.WAITING && childrenCountDown();
 if (b) setState(ProcedureState.RUNNABLE);
 return b;
}
origin: org.apache.hbase/hbase-procedure

/**
 * Try to set this procedure into RUNNABLE state.
 * Succeeds if all subprocedures/children are done.
 * @return True if we were able to move procedure to RUNNABLE state.
 */
synchronized boolean tryRunnable() {
 // Don't use isWaiting in the below; it returns true for WAITING and WAITING_TIMEOUT
 if (getState() == ProcedureState.WAITING && childrenCountDown()) {
  setState(ProcedureState.RUNNABLE);
  return true;
 } else {
  return false;
 }
}
origin: com.aliyun.hbase/alihbase-procedure

/**
 * Called by the ProcedureExecutor to assign the ID to the newly created procedure.
 */
@VisibleForTesting
@InterfaceAudience.Private
protected void setProcId(final long procId) {
 this.procId = procId;
 this.submittedTime = EnvironmentEdgeManager.currentTime();
 setState(ProcedureState.RUNNABLE);
}
origin: harbby/presto-connectors

/**
 * Called by the ProcedureExecutor to assign the ID to the newly created procedure.
 */
@VisibleForTesting
@InterfaceAudience.Private
protected void setProcId(final long procId) {
 this.procId = procId;
 this.startTime = EnvironmentEdgeManager.currentTime();
 setState(ProcedureState.RUNNABLE);
}
origin: org.apache.hbase/hbase-procedure

private void cleanupAfterRollbackOneStep(Procedure<TEnvironment> proc) {
 if (proc.removeStackIndex()) {
  if (!proc.isSuccess()) {
   proc.setState(ProcedureState.ROLLEDBACK);
  }
  // update metrics on finishing the procedure (fail)
  proc.updateMetricsOnFinish(getEnvironment(), proc.elapsedTime(), false);
  if (proc.hasParent()) {
   store.delete(proc.getProcId());
   procedures.remove(proc.getProcId());
  } else {
   final long[] childProcIds = rollbackStack.get(proc.getProcId()).getSubprocedureIds();
   if (childProcIds != null) {
    store.delete(proc, childProcIds);
   } else {
    store.update(proc);
   }
  }
 } else {
  store.update(proc);
 }
}
origin: org.apache.hbase/hbase-procedure

switch (procedure.getState()) {
 case RUNNABLE:
  procedure.setState(ProcedureState.WAITING);
  break;
 case WAITING_TIMEOUT:
origin: com.aliyun.hbase/alihbase-procedure

switch (procedure.getState()) {
 case RUNNABLE:
  procedure.setState(ProcedureState.WAITING);
  break;
 case WAITING_TIMEOUT:
org.apache.hadoop.hbase.procedure2ProceduresetState

Popular methods of Procedure

  • isFailed
  • getException
  • getProcId
  • getState
  • getLastUpdate
  • getParentProcId
  • getResult
  • isFinished
  • isSuccess
  • setTimeout
  • toString
  • addStackIndex
    Called by the RootProcedureState on procedure execution. Each procedure store its stack-index positi
  • toString,
  • addStackIndex,
  • execute,
  • getOwner,
  • hasException,
  • hasLock,
  • hasOwner,
  • hasParent,
  • setOwner,
  • setParentProcId

Popular in Java

  • Reading from database using SQL prepared statement
  • startActivity (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setRequestProperty (URLConnection)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Menu (java.awt)
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now