Java 类org.apache.hadoop.hbase.exceptions.PreemptiveFastFailException 实例源码

项目:ditb    文件:PreemptiveFastFailInterceptor.java   
public void intercept(FastFailInterceptorContext context)
    throws PreemptiveFastFailException {
  context.setFailureInfo(repeatedFailuresMap.get(context.getServer()));
  if (inFastFailMode(context.getServer()) && !currentThreadInFastFailMode()) {
    // In Fast-fail mode, all but one thread will fast fail. Check
    // if we are that one chosen thread.
    context.setRetryDespiteFastFailMode(shouldRetryInspiteOfFastFail(context
        .getFailureInfo()));
    if (!context.isRetryDespiteFastFailMode()) { // we don't have to retry
      LOG.debug("Throwing PFFE : " + context.getFailureInfo() + " tries : "
          + context.getTries());
      throw new PreemptiveFastFailException(
          context.getFailureInfo().numConsecutiveFailures.get(),
          context.getFailureInfo().timeOfFirstFailureMilliSec,
          context.getFailureInfo().timeOfLatestAttemptMilliSec, context.getServer());
    }
  }
  context.setDidTry(true);
}
项目:pbase    文件:PreemptiveFastFailInterceptor.java   
public void intercept(FastFailInterceptorContext context)
    throws PreemptiveFastFailException {
  context.setFailureInfo(repeatedFailuresMap.get(context.getServer()));
  if (inFastFailMode(context.getServer()) && !currentThreadInFastFailMode()) {
    // In Fast-fail mode, all but one thread will fast fail. Check
    // if we are that one chosen thread.
    context.setRetryDespiteFastFailMode(shouldRetryInspiteOfFastFail(context
        .getFailureInfo()));
    if (!context.isRetryDespiteFastFailMode()) { // we don't have to retry
      LOG.debug("Throwing PFFE : " + context.getFailureInfo() + " tries : "
          + context.getTries());
      throw new PreemptiveFastFailException(
          context.getFailureInfo().numConsecutiveFailures.get(),
          context.getFailureInfo().timeOfFirstFailureMilliSec,
          context.getFailureInfo().timeOfLatestAttemptMilliSec, context.getServer());
    }
  }
  context.setDidTry(true);
}
项目:hbase    文件:PreemptiveFastFailInterceptor.java   
public void intercept(FastFailInterceptorContext context)
    throws PreemptiveFastFailException {
  context.setFailureInfo(repeatedFailuresMap.get(context.getServer()));
  if (inFastFailMode(context.getServer()) && !currentThreadInFastFailMode()) {
    // In Fast-fail mode, all but one thread will fast fail. Check
    // if we are that one chosen thread.
    context.setRetryDespiteFastFailMode(shouldRetryInspiteOfFastFail(context
        .getFailureInfo()));
    if (!context.isRetryDespiteFastFailMode()) { // we don't have to retry
      LOG.debug("Throwing PFFE : " + context.getFailureInfo() + " tries : "
          + context.getTries());
      throw new PreemptiveFastFailException(
          context.getFailureInfo().numConsecutiveFailures.get(),
          context.getFailureInfo().timeOfFirstFailureMilliSec,
          context.getFailureInfo().timeOfLatestAttemptMilliSec, context.getServer(),
          context.getGuaranteedClientSideOnly().isTrue());
    }
  }
  context.setDidTry(true);
}
项目:ditb    文件:PreemptiveFastFailInterceptor.java   
@Override
public void intercept(RetryingCallerInterceptorContext context)
    throws PreemptiveFastFailException {
  if (context instanceof FastFailInterceptorContext) {
    intercept((FastFailInterceptorContext) context);
  }
}
项目:pbase    文件:PreemptiveFastFailInterceptor.java   
@Override
public void intercept(RetryingCallerInterceptorContext context)
    throws PreemptiveFastFailException {
  if (context instanceof FastFailInterceptorContext) {
    intercept((FastFailInterceptorContext) context);
  }
}
项目:hbase    文件:PreemptiveFastFailInterceptor.java   
@Override
public void intercept(RetryingCallerInterceptorContext context)
    throws PreemptiveFastFailException {
  if (context instanceof FastFailInterceptorContext) {
    intercept((FastFailInterceptorContext) context);
  }
}
项目:ditb    文件:NoOpRetryableCallerInterceptor.java   
@Override
public void intercept(
    RetryingCallerInterceptorContext abstractRetryingCallerInterceptorContext)
    throws PreemptiveFastFailException {
}
项目:pbase    文件:NoOpRetryableCallerInterceptor.java   
@Override
public void intercept(
    RetryingCallerInterceptorContext abstractRetryingCallerInterceptorContext)
    throws PreemptiveFastFailException {
}
项目:hbase    文件:NoOpRetryableCallerInterceptor.java   
@Override
public void intercept(
    RetryingCallerInterceptorContext abstractRetryingCallerInterceptorContext)
    throws PreemptiveFastFailException {
}