You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by om...@apache.org on 2011/03/15 17:23:20 UTC

svn commit: r1081836 [3/3] - in /hadoop/common/branches/branch-0.20-security: ./ src/core/org/apache/hadoop/classification/ src/core/org/apache/hadoop/log/ src/core/org/apache/hadoop/log/metrics/ src/core/org/apache/hadoop/metrics/ src/core/org/apache/...

Added: hadoop/common/branches/branch-0.20-security/src/core/org/apache/hadoop/metrics/util/MetricsLongValue.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security/src/core/org/apache/hadoop/metrics/util/MetricsLongValue.java?rev=1081836&view=auto
==============================================================================
--- hadoop/common/branches/branch-0.20-security/src/core/org/apache/hadoop/metrics/util/MetricsLongValue.java (added)
+++ hadoop/common/branches/branch-0.20-security/src/core/org/apache/hadoop/metrics/util/MetricsLongValue.java Tue Mar 15 16:23:19 2011
@@ -0,0 +1,92 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.metrics.util;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.metrics.MetricsRecord;
+
+
+/**
+ * The MetricsLongValue class is for a metric that is not time varied
+ * but changes only when it is set. 
+ * Each time its value is set, it is published only *once* at the next update
+ * call.
+ *
+ * @deprecated in favor of <code>org.apache.hadoop.metrics2</code> usage.
+ */
+@Deprecated
+@InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce"})
+public class MetricsLongValue extends MetricsBase{  
+  private long value;
+  private boolean changed;
+  
+  /**
+   * Constructor - create a new metric
+   * @param nam the name of the metrics to be used to publish the metric
+   * @param registry - where the metrics object will be registered
+   */
+  public MetricsLongValue(final String nam, final MetricsRegistry registry, final String description) {
+    super(nam, description);
+    value = 0;
+    changed = false;
+    registry.add(nam, this);
+  }
+  
+  /**
+   * Constructor - create a new metric
+   * @param nam the name of the metrics to be used to publish the metric
+   * @param registry - where the metrics object will be registered
+   * A description of {@link #NO_DESCRIPTION} is used
+   */
+  public MetricsLongValue(final String nam, MetricsRegistry registry) {
+    this(nam, registry, NO_DESCRIPTION);
+  }
+  
+  /**
+   * Set the value
+   * @param newValue
+   */
+  public synchronized void set(final long newValue) {
+    value = newValue;
+    changed = true;
+  }
+  
+  /**
+   * Get value
+   * @return the value last set
+   */
+  public synchronized long get() { 
+    return value;
+  } 
+ 
+
+  /**
+   * Push the metric to the mr.
+   * The metric is pushed only if it was updated since last push
+   * 
+   * Note this does NOT push to JMX
+   * (JMX gets the info via {@link #get()}
+   *
+   * @param mr
+   */
+  public synchronized void pushMetric(final MetricsRecord mr) {
+    if (changed) 
+      mr.setMetric(getName(), value);
+    changed = false;
+  }
+}

Added: hadoop/common/branches/branch-0.20-security/src/core/org/apache/hadoop/metrics/util/MetricsRegistry.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security/src/core/org/apache/hadoop/metrics/util/MetricsRegistry.java?rev=1081836&view=auto
==============================================================================
--- hadoop/common/branches/branch-0.20-security/src/core/org/apache/hadoop/metrics/util/MetricsRegistry.java (added)
+++ hadoop/common/branches/branch-0.20-security/src/core/org/apache/hadoop/metrics/util/MetricsRegistry.java Tue Mar 15 16:23:19 2011
@@ -0,0 +1,90 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.metrics.util;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+
+/**
+ * 
+ * This is the registry for metrics.
+ * Related set of metrics should be declared in a holding class and registered
+ * in a registry for those metrics which is also stored in the the holding class.
+ *
+ * @deprecated in favor of {@link org.apache.hadoop.metrics2.lib.MetricsRegistry}.
+ */
+@Deprecated
+@InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce"})
+public class MetricsRegistry {
+  private Map<String, MetricsBase> metricsList = new HashMap<String, MetricsBase>();
+
+  public MetricsRegistry() {
+  }
+  
+  /**
+   * 
+   * @return number of metrics in the registry
+   */
+  public int size() {
+    return metricsList.size();
+  }
+  
+  /**
+   * Add a new metrics to the registry
+   * @param metricsName - the name
+   * @param theMetricsObj - the metrics
+   * @throws IllegalArgumentException if a name is already registered
+   */
+  public synchronized void add(final String metricsName, final MetricsBase theMetricsObj) {
+    if (metricsList.containsKey(metricsName)) {
+      throw new IllegalArgumentException("Duplicate metricsName:" + metricsName);
+    }
+    metricsList.put(metricsName, theMetricsObj);
+  }
+
+  
+  /**
+   * 
+   * @param metricsName
+   * @return the metrics if there is one registered by the supplied name.
+   *         Returns null if none is registered
+   */
+  public synchronized MetricsBase get(final String metricsName) {
+    return metricsList.get(metricsName);
+  }
+  
+  
+  /**
+   * 
+   * @return the list of metrics names
+   */
+  public synchronized Collection<String> getKeyList() {
+    return metricsList.keySet();
+  }
+  
+  /**
+   * 
+   * @return the list of metrics
+   */
+  public synchronized Collection<MetricsBase> getMetricsList() {
+    return metricsList.values();
+  }
+}

Added: hadoop/common/branches/branch-0.20-security/src/core/org/apache/hadoop/metrics/util/MetricsTimeVaryingInt.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security/src/core/org/apache/hadoop/metrics/util/MetricsTimeVaryingInt.java?rev=1081836&view=auto
==============================================================================
--- hadoop/common/branches/branch-0.20-security/src/core/org/apache/hadoop/metrics/util/MetricsTimeVaryingInt.java (added)
+++ hadoop/common/branches/branch-0.20-security/src/core/org/apache/hadoop/metrics/util/MetricsTimeVaryingInt.java Tue Mar 15 16:23:19 2011
@@ -0,0 +1,132 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.metrics.util;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.metrics.MetricsRecord;
+import org.apache.hadoop.util.StringUtils;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * The MetricsTimeVaryingInt class is for a metric that naturally
+ * varies over time (e.g. number of files created). The metrics is accumulated
+ * over an interval (set in the metrics config file); the metrics is
+ *  published at the end of each interval and then 
+ * reset to zero. Hence the counter has the value in the current interval. 
+ * 
+ * Note if one wants a time associated with the metric then use
+ * @see org.apache.hadoop.metrics.util.MetricsTimeVaryingRate
+ *
+ * @deprecated in favor of {@link org.apache.hadoop.metrics2.lib.MutableCounterInt}.
+ */
+@Deprecated
+@InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce"})
+public class MetricsTimeVaryingInt extends MetricsBase {
+
+  private static final Log LOG =
+    LogFactory.getLog("org.apache.hadoop.metrics.util");
+  
+  private int currentValue;
+  private int previousIntervalValue;
+  
+  
+  /**
+   * Constructor - create a new metric
+   * @param nam the name of the metrics to be used to publish the metric
+   * @param registry - where the metrics object will be registered
+   * @param description - the description
+   */
+  public MetricsTimeVaryingInt(final String nam,
+                               final MetricsRegistry registry,
+                               final String description) {
+    super(nam, description);
+    currentValue = 0;
+    previousIntervalValue = 0;
+    registry.add(nam, this);
+  }
+  
+  /**
+   * Constructor - create a new metric
+   * @param nam the name of the metrics to be used to publish the metric
+   * @param registry - where the metrics object will be registered
+   * A description of {@link #NO_DESCRIPTION} is used
+   */
+  public MetricsTimeVaryingInt(final String nam, final MetricsRegistry registry) {
+    this(nam, registry, NO_DESCRIPTION);
+  }
+  
+
+  
+  /**
+   * Inc metrics for incr vlaue
+   * @param incr - number of operations
+   */
+  public synchronized void inc(final int incr) {
+    currentValue += incr;
+  }
+  
+  /**
+   * Inc metrics by one
+   */
+  public synchronized void inc() {
+    currentValue++;
+  }
+
+  private synchronized void intervalHeartBeat() {
+     previousIntervalValue = currentValue;
+     currentValue = 0;
+  }
+  
+  /**
+   * Push the delta  metrics to the mr.
+   * The delta is since the last push/interval.
+   * 
+   * Note this does NOT push to JMX
+   * (JMX gets the info via {@link #previousIntervalValue}
+   *
+   * @param mr
+   */
+  public synchronized void pushMetric(final MetricsRecord mr) {
+    intervalHeartBeat();
+    try {
+      mr.incrMetric(getName(), getPreviousIntervalValue());
+    } catch (Exception e) {
+      LOG.info("pushMetric failed for " + getName() + "\n" +
+          StringUtils.stringifyException(e));
+    }
+  }
+  
+  
+  /**
+   * The Value at the Previous interval
+   * @return prev interval value
+   */
+  public synchronized int getPreviousIntervalValue() { 
+    return previousIntervalValue;
+  }
+  
+  /**
+   * The Value at the current interval
+   * @return prev interval value
+   */
+  public synchronized int getCurrentIntervalValue() { 
+    return currentValue;
+  } 
+}

Added: hadoop/common/branches/branch-0.20-security/src/core/org/apache/hadoop/metrics/util/MetricsTimeVaryingLong.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security/src/core/org/apache/hadoop/metrics/util/MetricsTimeVaryingLong.java?rev=1081836&view=auto
==============================================================================
--- hadoop/common/branches/branch-0.20-security/src/core/org/apache/hadoop/metrics/util/MetricsTimeVaryingLong.java (added)
+++ hadoop/common/branches/branch-0.20-security/src/core/org/apache/hadoop/metrics/util/MetricsTimeVaryingLong.java Tue Mar 15 16:23:19 2011
@@ -0,0 +1,128 @@
+package org.apache.hadoop.metrics.util;
+
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.metrics.MetricsRecord;
+import org.apache.hadoop.util.StringUtils;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * The MetricsTimeVaryingLong class is for a metric that naturally
+ * varies over time (e.g. number of files created). The metrics is accumulated
+ * over an interval (set in the metrics config file); the metrics is
+ *  published at the end of each interval and then 
+ * reset to zero. Hence the counter has the value in the current interval. 
+ * 
+ * Note if one wants a time associated with the metric then use
+ * @see org.apache.hadoop.metrics.util.MetricsTimeVaryingRate
+ *
+ * @deprecated in favor of {@link org.apache.hadoop.metrics2.lib.MutableCounterLong}.
+ */
+@Deprecated
+@InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce"})
+public class MetricsTimeVaryingLong extends MetricsBase{
+
+  private static final Log LOG =
+    LogFactory.getLog("org.apache.hadoop.metrics.util");
+ 
+  private long currentValue;
+  private long previousIntervalValue;
+  
+  /**
+   * Constructor - create a new metric
+   * @param nam the name of the metrics to be used to publish the metric
+   * @param registry - where the metrics object will be registered
+   */
+  public MetricsTimeVaryingLong(final String nam, MetricsRegistry registry, final String description) {
+    super(nam, description);
+    currentValue = 0;
+    previousIntervalValue = 0;
+    registry.add(nam, this);
+  }
+  
+  
+  /**
+   * Constructor - create a new metric
+   * @param nam the name of the metrics to be used to publish the metric
+   * @param registry - where the metrics object will be registered
+   * A description of {@link #NO_DESCRIPTION} is used
+   */
+  public MetricsTimeVaryingLong(final String nam, MetricsRegistry registry) {
+    this(nam, registry, NO_DESCRIPTION);
+  }
+  
+  /**
+   * Inc metrics for incr vlaue
+   * @param incr - number of operations
+   */
+  public synchronized void inc(final long incr) {
+    currentValue += incr;
+  }
+  
+  /**
+   * Inc metrics by one
+   */
+  public synchronized void inc() {
+    currentValue++;
+  }
+
+  private synchronized void intervalHeartBeat() {
+     previousIntervalValue = currentValue;
+     currentValue = 0;
+  }
+  
+  /**
+   * Push the delta  metrics to the mr.
+   * The delta is since the last push/interval.
+   * 
+   * Note this does NOT push to JMX
+   * (JMX gets the info via {@link #previousIntervalValue}
+   *
+   * @param mr
+   */
+  public synchronized void pushMetric(final MetricsRecord mr) {
+    intervalHeartBeat();
+    try {
+      mr.incrMetric(getName(), getPreviousIntervalValue());
+    } catch (Exception e) {
+      LOG.info("pushMetric failed for " + getName() + "\n" +
+          StringUtils.stringifyException(e));
+    }
+  }
+  
+  
+  /**
+   * The Value at the Previous interval
+   * @return prev interval value
+   */
+  public synchronized long getPreviousIntervalValue() { 
+    return previousIntervalValue;
+  } 
+  
+  /**
+   * The Value at the current interval
+   * @return prev interval value
+   */
+  public synchronized long getCurrentIntervalValue() { 
+    return currentValue;
+  } 
+}

Added: hadoop/common/branches/branch-0.20-security/src/core/org/apache/hadoop/metrics/util/MetricsTimeVaryingRate.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security/src/core/org/apache/hadoop/metrics/util/MetricsTimeVaryingRate.java?rev=1081836&view=auto
==============================================================================
--- hadoop/common/branches/branch-0.20-security/src/core/org/apache/hadoop/metrics/util/MetricsTimeVaryingRate.java (added)
+++ hadoop/common/branches/branch-0.20-security/src/core/org/apache/hadoop/metrics/util/MetricsTimeVaryingRate.java Tue Mar 15 16:23:19 2011
@@ -0,0 +1,200 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.metrics.util;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.metrics.MetricsRecord;
+import org.apache.hadoop.util.StringUtils;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * The MetricsTimeVaryingRate class is for a rate based metric that
+ * naturally varies over time (e.g. time taken to create a file).
+ * The rate is averaged at each interval heart beat (the interval
+ * is set in the metrics config file).
+ * This class also keeps track of the min and max rates along with 
+ * a method to reset the min-max.
+ *
+ * @deprecated in favor of {@link org.apache.hadoop.metrics2.lib.MutableRate}.
+ */
+@Deprecated
+@InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce"})
+public class MetricsTimeVaryingRate extends MetricsBase {
+
+  private static final Log LOG =
+    LogFactory.getLog("org.apache.hadoop.metrics.util");
+
+  static class Metrics {
+    int numOperations = 0;
+    long time = 0;  // total time or average time
+
+    void set(final Metrics resetTo) {
+      numOperations = resetTo.numOperations;
+      time = resetTo.time;
+    }
+    
+    void reset() {
+      numOperations = 0;
+      time = 0;
+    }
+  }
+  
+  static class MinMax {
+    long minTime = -1;
+    long maxTime = 0;
+    
+    void set(final MinMax newVal) {
+      minTime = newVal.minTime;
+      maxTime = newVal.maxTime;
+    }
+    
+    void reset() {
+      minTime = -1;
+      maxTime = 0;
+    }
+    void update(final long time) { // update min max
+      minTime = (minTime == -1) ? time : Math.min(minTime, time);
+      minTime = Math.min(minTime, time);
+      maxTime = Math.max(maxTime, time);
+    }
+  }
+  private Metrics currentData;
+  private Metrics previousIntervalData;
+  private MinMax minMax;
+  
+  
+  /**
+   * Constructor - create a new metric
+   * @param nam the name of the metrics to be used to publish the metric
+   * @param registry - where the metrics object will be registered
+   */
+  public MetricsTimeVaryingRate(final String nam, final MetricsRegistry registry, final String description) {
+    super(nam, description);
+    currentData = new Metrics();
+    previousIntervalData = new Metrics();
+    minMax = new MinMax();
+    registry.add(nam, this);
+  }
+  
+  /**
+   * Constructor - create a new metric
+   * @param nam the name of the metrics to be used to publish the metric
+   * @param registry - where the metrics object will be registered
+   * A description of {@link #NO_DESCRIPTION} is used
+   */
+  public MetricsTimeVaryingRate(final String nam, MetricsRegistry registry) {
+    this(nam, registry, NO_DESCRIPTION);
+
+  }
+  
+  
+  /**
+   * Increment the metrics for numOps operations
+   * @param numOps - number of operations
+   * @param time - time for numOps operations
+   */
+  public synchronized void inc(final int numOps, final long time) {
+    currentData.numOperations += numOps;
+    currentData.time += time;
+    long timePerOps = time/numOps;
+    minMax.update(timePerOps);
+  }
+  
+  /**
+   * Increment the metrics for one operation
+   * @param time for one operation
+   */
+  public synchronized void inc(final long time) {
+    currentData.numOperations++;
+    currentData.time += time;
+    minMax.update(time);
+  }
+  
+  
+
+  private synchronized void intervalHeartBeat() {
+     previousIntervalData.numOperations = currentData.numOperations;
+     previousIntervalData.time = (currentData.numOperations == 0) ?
+                             0 : currentData.time / currentData.numOperations;
+     currentData.reset();
+  }
+  
+  /**
+   * Push the delta  metrics to the mr.
+   * The delta is since the last push/interval.
+   * 
+   * Note this does NOT push to JMX
+   * (JMX gets the info via {@link #getPreviousIntervalAverageTime()} and
+   * {@link #getPreviousIntervalNumOps()}
+   *
+   * @param mr
+   */
+  public synchronized void pushMetric(final MetricsRecord mr) {
+    intervalHeartBeat();
+    try {
+      mr.incrMetric(getName() + "_num_ops", getPreviousIntervalNumOps());
+      mr.setMetric(getName() + "_avg_time", getPreviousIntervalAverageTime());
+    } catch (Exception e) {
+      LOG.info("pushMetric failed for " + getName() + "\n" +
+          StringUtils.stringifyException(e));
+    }
+  }
+  
+  /**
+   * The number of operations in the previous interval
+   * @return - ops in prev interval
+   */
+  public synchronized int getPreviousIntervalNumOps() { 
+    return previousIntervalData.numOperations;
+  }
+  
+  /**
+   * The average rate of an operation in the previous interval
+   * @return - the average rate.
+   */
+  public synchronized long getPreviousIntervalAverageTime() {
+    return previousIntervalData.time;
+  } 
+  
+  /**
+   * The min time for a single operation since the last reset
+   *  {@link #resetMinMax()}
+   * @return min time for an operation
+   */
+  public synchronized long getMinTime() {
+    return  minMax.minTime;
+  }
+  
+  /**
+   * The max time for a single operation since the last reset
+   *  {@link #resetMinMax()}
+   * @return max time for an operation
+   */
+  public synchronized long getMaxTime() {
+    return minMax.maxTime;
+  }
+  
+  /**
+   * Reset the min max values
+   */
+  public synchronized void resetMinMax() {
+    minMax.reset();
+  }
+}

Added: hadoop/common/branches/branch-0.20-security/src/core/org/apache/hadoop/metrics/util/package-info.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security/src/core/org/apache/hadoop/metrics/util/package-info.java?rev=1081836&view=auto
==============================================================================
--- hadoop/common/branches/branch-0.20-security/src/core/org/apache/hadoop/metrics/util/package-info.java (added)
+++ hadoop/common/branches/branch-0.20-security/src/core/org/apache/hadoop/metrics/util/package-info.java Tue Mar 15 16:23:19 2011
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+@InterfaceAudience.LimitedPrivate({"HBase", "HDFS", "MapReduce"})
+@InterfaceStability.Evolving
+package org.apache.hadoop.metrics.util;
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;