Java 类org.apache.hadoop.fs.azure.metrics.ErrorMetricUpdater 实例源码

项目:hadoop    文件:AzureNativeFileSystemStore.java   
/**
 * Creates a new OperationContext for the Azure Storage operation that has
 * listeners hooked to it that will update the metrics for this file system.
 * 
 * @param bindConcurrentOOBIo
 *          - bind to intercept send request call backs to handle OOB I/O.
 * 
 * @return The OperationContext object to use.
 */
private OperationContext getInstrumentedContext(boolean bindConcurrentOOBIo) {

  OperationContext operationContext = new OperationContext();

  if (selfThrottlingEnabled) {
    SelfThrottlingIntercept.hook(operationContext, selfThrottlingReadFactor,
        selfThrottlingWriteFactor);
  }

  if(bandwidthGaugeUpdater != null) {
    //bandwidthGaugeUpdater is null when we config to skip azure metrics
    ResponseReceivedMetricUpdater.hook(
       operationContext,
       instrumentation,
       bandwidthGaugeUpdater);
  }

  // Bind operation context to receive send request callbacks on this operation.
  // If reads concurrent to OOB writes are allowed, the interception will reset
  // the conditional header on all Azure blob storage read requests.
  if (bindConcurrentOOBIo) {
    SendRequestIntercept.bind(storageInteractionLayer.getCredentials(),
        operationContext, true);
  }

  if (testHookOperationContext != null) {
    operationContext =
        testHookOperationContext.modifyOperationContext(operationContext);
  }

  ErrorMetricUpdater.hook(operationContext, instrumentation);

  // Return the operation context.
  return operationContext;
}
项目:aliyun-oss-hadoop-fs    文件:AzureNativeFileSystemStore.java   
/**
 * Creates a new OperationContext for the Azure Storage operation that has
 * listeners hooked to it that will update the metrics for this file system.
 * 
 * @param bindConcurrentOOBIo
 *          - bind to intercept send request call backs to handle OOB I/O.
 * 
 * @return The OperationContext object to use.
 */
private OperationContext getInstrumentedContext(boolean bindConcurrentOOBIo) {

  OperationContext operationContext = new OperationContext();

  if (selfThrottlingEnabled) {
    SelfThrottlingIntercept.hook(operationContext, selfThrottlingReadFactor,
        selfThrottlingWriteFactor);
  }

  if(bandwidthGaugeUpdater != null) {
    //bandwidthGaugeUpdater is null when we config to skip azure metrics
    ResponseReceivedMetricUpdater.hook(
       operationContext,
       instrumentation,
       bandwidthGaugeUpdater);
  }

  // Bind operation context to receive send request callbacks on this operation.
  // If reads concurrent to OOB writes are allowed, the interception will reset
  // the conditional header on all Azure blob storage read requests.
  if (bindConcurrentOOBIo) {
    SendRequestIntercept.bind(storageInteractionLayer.getCredentials(),
        operationContext, true);
  }

  if (testHookOperationContext != null) {
    operationContext =
        testHookOperationContext.modifyOperationContext(operationContext);
  }

  ErrorMetricUpdater.hook(operationContext, instrumentation);

  // Return the operation context.
  return operationContext;
}
项目:big-c    文件:AzureNativeFileSystemStore.java   
/**
 * Creates a new OperationContext for the Azure Storage operation that has
 * listeners hooked to it that will update the metrics for this file system.
 * 
 * @param bindConcurrentOOBIo
 *          - bind to intercept send request call backs to handle OOB I/O.
 * 
 * @return The OperationContext object to use.
 */
private OperationContext getInstrumentedContext(boolean bindConcurrentOOBIo) {

  OperationContext operationContext = new OperationContext();

  if (selfThrottlingEnabled) {
    SelfThrottlingIntercept.hook(operationContext, selfThrottlingReadFactor,
        selfThrottlingWriteFactor);
  }

  if(bandwidthGaugeUpdater != null) {
    //bandwidthGaugeUpdater is null when we config to skip azure metrics
    ResponseReceivedMetricUpdater.hook(
       operationContext,
       instrumentation,
       bandwidthGaugeUpdater);
  }

  // Bind operation context to receive send request callbacks on this operation.
  // If reads concurrent to OOB writes are allowed, the interception will reset
  // the conditional header on all Azure blob storage read requests.
  if (bindConcurrentOOBIo) {
    SendRequestIntercept.bind(storageInteractionLayer.getCredentials(),
        operationContext, true);
  }

  if (testHookOperationContext != null) {
    operationContext =
        testHookOperationContext.modifyOperationContext(operationContext);
  }

  ErrorMetricUpdater.hook(operationContext, instrumentation);

  // Return the operation context.
  return operationContext;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:AzureNativeFileSystemStore.java   
/**
 * Creates a new OperationContext for the Azure Storage operation that has
 * listeners hooked to it that will update the metrics for this file system.
 * 
 * @param bindConcurrentOOBIo
 *          - bind to intercept send request call backs to handle OOB I/O.
 * 
 * @return The OperationContext object to use.
 */
private OperationContext getInstrumentedContext(boolean bindConcurrentOOBIo) {

  OperationContext operationContext = new OperationContext();

  if (selfThrottlingEnabled) {
    SelfThrottlingIntercept.hook(operationContext, selfThrottlingReadFactor,
        selfThrottlingWriteFactor);
  }

  ResponseReceivedMetricUpdater.hook(
      operationContext,
      instrumentation,
      bandwidthGaugeUpdater);

  // Bind operation context to receive send request callbacks on this operation.
  // If reads concurrent to OOB writes are allowed, the interception will reset
  // the conditional header on all Azure blob storage read requests.
  if (bindConcurrentOOBIo) {
    SendRequestIntercept.bind(storageInteractionLayer.getCredentials(),
        operationContext, true);
  }

  if (testHookOperationContext != null) {
    operationContext =
        testHookOperationContext.modifyOperationContext(operationContext);
  }

  ErrorMetricUpdater.hook(operationContext, instrumentation);

  // Return the operation context.
  return operationContext;
}