Examples of MetricsException


Examples of org.apache.hadoop.metrics.MetricsException

        else if (a instanceof Byte) {
            return new Byte((byte)(a.byteValue() + b.byteValue()));
        }
        else {
            // should never happen
            throw new MetricsException("Invalid number type");
        }
           
    }
View Full Code Here

Examples of org.apache.hadoop.metrics.MetricsException

      try {
        period = Integer.parseInt(periodStr);
      } catch (NumberFormatException nfe) {
      }
      if (period <= 0) {
        throw new MetricsException("Invalid period: " + periodStr);
      }
      setPeriod(period);
    }
       
    metricsServers =
View Full Code Here

Examples of org.apache.hadoop.metrics.MetricsException

    else if (a instanceof Long) {
      return Long.valueOf((a.longValue() + b.longValue()));
    }
    else {
      // should never happen
      throw new MetricsException("Invalid number type");
    }
           
  }
View Full Code Here

Examples of org.apache.hadoop.metrics.MetricsException

    else if (a instanceof Byte) {
      return new Byte((byte)(a.byteValue() + b.byteValue()));
    }
    else {
      // should never happen
      throw new MetricsException("Invalid number type");
    }
           
  }
View Full Code Here

Examples of org.apache.hadoop.metrics2.MetricsException

  @Override
  public synchronized void start() {
    checkNotNull(prefix, "prefix");
    if (monitoring) {
      LOG.warn(prefix +" metrics system already started!",
               new MetricsException("Illegal start"));
      return;
    }
    for (Callback cb : callbacks) cb.preStart();
    configure(prefix);
    startTimer();
View Full Code Here

Examples of org.apache.hadoop.metrics2.MetricsException

  @Override
  public synchronized void stop() {
    if (!monitoring && !DefaultMetricsSystem.inMiniClusterMode()) {
      LOG.warn(prefix +" metrics system not yet started!",
               new MetricsException("Illegal stop"));
      return;
    }
    if (!monitoring) {
      // in mini cluster mode
      LOG.info(prefix +" metrics system stopped (again)");
View Full Code Here

Examples of org.apache.hadoop.metrics2.MetricsException

    MetricsTag tag = new MetricsTag(name, description, value);

    if (!override) {
      MetricsTag existing = tagsMap.putIfAbsent(name, tag);
      if (existing != null) {
        throw new MetricsException("Tag " + name + " already exists!");
      }
      return this;
    }

    tagsMap.put(name, tag);
View Full Code Here

Examples of org.apache.hadoop.metrics2.MetricsException

        return newGauge;
      }
    }

    if (!(metric instanceof MetricMutableGaugeLong)) {
      throw new MetricsException(
          "Metric already exists in registry for metric name: " + name
              + " and not of type MetricMutableGaugeLong");
    }

    return (MetricMutableGaugeLong) metric;
View Full Code Here

Examples of org.apache.hadoop.metrics2.MetricsException

        return newCounter;
      }
    }

    if (!(counter instanceof MetricMutableCounterLong)) {
      throw new MetricsException(
          "Metric already exists in registry for metric name: " + name
              + "and not of type MetricMutableCounterLong");
    }

    return (MetricMutableCounterLong) counter;
View Full Code Here

Examples of org.apache.hadoop.metrics2.MetricsException

        return newHisto;
      }
    }

    if (!(histo instanceof MetricMutableHistogram)) {
      throw new MetricsException(
          "Metric already exists in registry for metric name: " + name
              + "and not of type MetricMutableHistogram");
    }

    return (MetricMutableHistogram) histo;
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.