Examples of OperationMetrics


Examples of com.fasterxml.clustermate.service.metrics.OperationMetrics

    @Override
    public void handleDelete(ServletServiceRequest request, ServletServiceResponse response,
            OperationDiagnostics stats) throws IOException
    {
        final OperationMetrics metrics = _listMetrics;
        Context timer = (metrics == null) ? null : metrics.start();
        try {
            K prefix = _findKey(request, response);
            if (prefix == null) {
                super.handleDelete(request, response, stats);
                return;
            }
            _storeHandler.removeEntries(request, response, prefix, stats);
            _addStdHeaders(response);
            response.writeOut(null);
        } finally {
            if (metrics != null) {
                 metrics.finish(timer, stats);
            }
        }
    }
View Full Code Here

Examples of com.fasterxml.clustermate.service.metrics.OperationMetrics

    @Override
    public void handleGet(ServletServiceRequest request, ServletServiceResponse response,
            OperationDiagnostics stats) throws IOException
    {
        final OperationMetrics metrics = _listMetrics;
        Context timer = (metrics == null) ? null : metrics.start();
        String str = request.getQueryParameter(ClusterMateConstants.QUERY_PARAM_SINCE);
        try {
            if (str == null) {
                response = _syncHandler.missingArgument(response, ClusterMateConstants.QUERY_PARAM_SINCE);
            } else {
                long since = -1;
                try {
                    since = Long.parseLong(str);
                } catch (NumberFormatException e) { }
                if (since < 0L) {
                    response = _syncHandler.invalidArgument(response, ClusterMateConstants.QUERY_PARAM_SINCE, str);
                } else {
                    try {
                        response = listEntries(request, response, since, stats);
                    } catch (IllegalStateException e) {
                        // Swallow during shutdown
                        if (!_terminated.get()) {
                            LOG.error("Failed call to "+_loggedMethodName+": "+e.getMessage(), e);
                        }
                        response.internalError("Failed call to "+_loggedMethodName+": "+e.getMessage());
                    } catch (InterruptedException e) {
                        // Swallow during shutdown (mostly during tests)
                        if (_terminated.get()) {
                            LOG.info("SyncListServlet interrupted due to termination, ignoring");
                        } else {
                            reportUnexpectedInterruptForListEntries();
                        }
                        return;
                    }
                    _addStdHeaders(response);
                }
            }
            response.writeOut(_jsonWriter);
        } finally {
            if (metrics != null) {
                metrics.finish(timer, stats);
           }
        }
    }
View Full Code Here

Examples of com.fasterxml.clustermate.service.metrics.OperationMetrics

    @Override
    public void handlePost(ServletServiceRequest request, ServletServiceResponse response,
            OperationDiagnostics metadata) throws IOException
    {
        final OperationMetrics metrics = _pullMetrics;
        Context timer = (metrics == null) ? null : metrics.start();
        try {
            response = _pullEntries(request, response, metadata);
            _addStdHeaders(response);
            response.writeOut(_jsonWriter);
        } finally {
            if (metrics != null) {
                metrics.finish(timer, metadata);
           }
        }
    }
View Full Code Here

Examples of com.fasterxml.clustermate.service.metrics.OperationMetrics

   
    @Override
    public void handlePost(ServletServiceRequest request, ServletServiceResponse response,
            OperationDiagnostics metadata) throws IOException
    {
        final OperationMetrics metrics = _pullMetrics;
        Context timer = (metrics == null) ? null : metrics.start();
        try {
            _syncHandler.pullEntries(request, response, request.getInputStream(), metadata);
            _addStdHeaders(response);
            response.writeOut(_jsonWriter);
        } finally {
            if (metrics != null) {
                metrics.finish(timer, metadata);
           }
        }
    }
View Full Code Here

Examples of com.fasterxml.clustermate.service.metrics.OperationMetrics

   
    @Override
    public void handlePost(ServletServiceRequest request, ServletServiceResponse response,
            OperationDiagnostics metadata) throws IOException
    {
        final OperationMetrics metrics = _pullMetrics;
        Context timer = (metrics == null) ? null : metrics.start();
        try {
            _syncHandler.pullEntries(request, response, request.getInputStream(), metadata);
            _addStdHeaders(response);
            response.writeOut(_jsonWriter);
        } finally {
            if (metrics != null) {
                metrics.finish(timer, metadata);
           }
        }
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.regionserver.metrics.OperationMetrics

    this.regionInfo = null;
    this.htableDescriptor = null;
    this.threadWakeFrequency = 0L;
    this.coprocessorHost = null;
    this.scannerReadPoints = new ConcurrentHashMap<RegionScanner, Long>();
    this.opMetrics = new OperationMetrics();

    this.maxBusyWaitDuration = 2 * HConstants.DEFAULT_HBASE_RPC_TIMEOUT;
    this.busyWaitDuration = DEFAULT_BUSY_WAIT_DURATION;
    this.maxBusyWaitMultiplier = 2;
    this.deferredLogSyncDisabled = false;
View Full Code Here

Examples of org.apache.hadoop.hbase.regionserver.metrics.OperationMetrics

        10 * 1000);
    String encodedNameStr = this.regionInfo.getEncodedName();
    setHTableSpecificConf();
    this.regiondir = getRegionDir(this.tableDir, encodedNameStr);
    this.scannerReadPoints = new ConcurrentHashMap<RegionScanner, Long>();
    this.opMetrics = new OperationMetrics(conf, this.regionInfo);

    this.busyWaitDuration = conf.getLong(
      "hbase.busy.wait.duration", DEFAULT_BUSY_WAIT_DURATION);
    this.maxBusyWaitMultiplier = conf.getInt("hbase.busy.wait.multiplier.max", 2);
    if (busyWaitDuration * maxBusyWaitMultiplier <= 0L) {
View Full Code Here

Examples of org.apache.hadoop.hbase.regionserver.metrics.OperationMetrics

    this.regionInfo = null;
    this.htableDescriptor = null;
    this.threadWakeFrequency = 0L;
    this.coprocessorHost = null;
    this.scannerReadPoints = new ConcurrentHashMap<RegionScanner, Long>();
    this.opMetrics = new OperationMetrics();

    this.maxBusyWaitDuration = 2 * HConstants.DEFAULT_HBASE_RPC_TIMEOUT;
    this.busyWaitDuration = DEFAULT_BUSY_WAIT_DURATION;
    this.maxBusyWaitMultiplier = 2;
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.regionserver.metrics.OperationMetrics

        10 * 1000);
    String encodedNameStr = this.regionInfo.getEncodedName();
    setHTableSpecificConf();
    this.regiondir = getRegionDir(this.tableDir, encodedNameStr);
    this.scannerReadPoints = new ConcurrentHashMap<RegionScanner, Long>();
    this.opMetrics = new OperationMetrics(conf, this.regionInfo);

    this.busyWaitDuration = conf.getLong(
      "hbase.busy.wait.duration", DEFAULT_BUSY_WAIT_DURATION);
    this.maxBusyWaitMultiplier = conf.getInt("hbase.busy.wait.multiplier.max", 2);
    if (busyWaitDuration * maxBusyWaitMultiplier <= 0L) {
View Full Code Here

Examples of org.apache.hadoop.hbase.regionserver.metrics.OperationMetrics

    this.regionInfo = null;
    this.htableDescriptor = null;
    this.threadWakeFrequency = 0L;
    this.coprocessorHost = null;
    this.scannerReadPoints = new ConcurrentHashMap<RegionScanner, Long>();
    this.opMetrics = new OperationMetrics();

    this.maxBusyWaitDuration = 2 * HConstants.DEFAULT_HBASE_RPC_TIMEOUT;
    this.busyWaitDuration = DEFAULT_BUSY_WAIT_DURATION;
    this.maxBusyWaitMultiplier = 2;
    this.deferredLogSyncDisabled = false;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.