hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oz...@apache.org
Subject hadoop git commit: HADOOP-7266. Deprecate metrics v1. Contributed by Akira AJISAKA.
Date Fri, 23 Oct 2015 14:49:35 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 4ee8297c8 -> de739cabb


HADOOP-7266. Deprecate metrics v1. Contributed by Akira AJISAKA.

(cherry picked from commit 35a303dfbe348f96c465fb8778ced6b5bb617e89)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/de739cab
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/de739cab
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/de739cab

Branch: refs/heads/branch-2
Commit: de739cabb1969b2439bc8395a6bfe7ef23671a36
Parents: 4ee8297
Author: Tsuyoshi Ozawa <ozawa@apache.org>
Authored: Fri Oct 23 23:47:51 2015 +0900
Committer: Tsuyoshi Ozawa <ozawa@apache.org>
Committed: Fri Oct 23 23:48:36 2015 +0900

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt                 | 2 ++
 .../src/main/java/org/apache/hadoop/http/HttpServer2.java       | 2 ++
 .../src/main/java/org/apache/hadoop/metrics/ContextFactory.java | 3 +++
 .../src/main/java/org/apache/hadoop/metrics/MetricsContext.java | 3 +++
 .../main/java/org/apache/hadoop/metrics/MetricsException.java   | 2 ++
 .../src/main/java/org/apache/hadoop/metrics/MetricsRecord.java  | 3 +++
 .../src/main/java/org/apache/hadoop/metrics/MetricsServlet.java | 3 +++
 .../src/main/java/org/apache/hadoop/metrics/MetricsUtil.java    | 2 ++
 .../src/main/java/org/apache/hadoop/metrics/Updater.java        | 3 +++
 .../java/org/apache/hadoop/metrics/ganglia/GangliaContext.java  | 5 ++++-
 .../org/apache/hadoop/metrics/ganglia/GangliaContext31.java     | 4 ++++
 .../main/java/org/apache/hadoop/metrics/jvm/EventCounter.java   | 3 +++
 .../src/main/java/org/apache/hadoop/metrics/jvm/JvmMetrics.java | 3 +++
 .../org/apache/hadoop/metrics/spi/AbstractMetricsContext.java   | 3 +++
 .../java/org/apache/hadoop/metrics/spi/CompositeContext.java    | 4 ++++
 .../main/java/org/apache/hadoop/metrics/spi/MetricValue.java    | 1 +
 .../java/org/apache/hadoop/metrics/spi/MetricsRecordImpl.java   | 4 ++++
 .../org/apache/hadoop/metrics/spi/NoEmitMetricsContext.java     | 3 +++
 .../main/java/org/apache/hadoop/metrics/spi/NullContext.java    | 2 ++
 .../apache/hadoop/metrics/spi/NullContextWithUpdateThread.java  | 2 ++
 .../main/java/org/apache/hadoop/metrics/spi/OutputRecord.java   | 3 +++
 .../src/main/java/org/apache/hadoop/metrics/spi/Util.java       | 3 +++
 .../src/main/java/org/apache/hadoop/metrics/util/MBeanUtil.java | 2 ++
 .../main/java/org/apache/hadoop/metrics/util/MetricsBase.java   | 2 ++
 .../org/apache/hadoop/metrics/util/MetricsDynamicMBeanBase.java | 3 ++-
 .../java/org/apache/hadoop/metrics/util/MetricsIntValue.java    | 2 ++
 .../java/org/apache/hadoop/metrics/util/MetricsLongValue.java   | 2 ++
 .../java/org/apache/hadoop/metrics/util/MetricsRegistry.java    | 2 ++
 .../org/apache/hadoop/metrics/util/MetricsTimeVaryingInt.java   | 3 ++-
 .../org/apache/hadoop/metrics/util/MetricsTimeVaryingLong.java  | 3 ++-
 .../org/apache/hadoop/metrics/util/MetricsTimeVaryingRate.java  | 2 ++
 .../test/java/org/apache/hadoop/metrics/TestMetricsServlet.java | 1 +
 .../org/apache/hadoop/metrics/ganglia/TestGangliaContext.java   | 1 +
 .../java/org/apache/hadoop/metrics/spi/TestOutputRecord.java    | 1 +
 34 files changed, 83 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index 090d4e2..7ac0878 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -314,6 +314,8 @@ Release 2.8.0 - UNRELEASED
     HADOOP-9692. Improving log message when SequenceFile reader throws
     EOFException on zero-length file. (Zhe Zhang and Chu Tong via ozawa)
 
+    HADOOP-7266. Deprecate metrics v1. (Akira AJISAKA via ozawa)
+
   OPTIMIZATIONS
 
     HADOOP-11785. Reduce the number of listStatus operation in distcp

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java
index 11ab23b..c6e7925 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java
@@ -573,7 +573,9 @@ public final class HttpServer2 implements FilterContainer {
 
   /**
    * Add default servlets.
+   * Note: /metrics servlet will be removed in 3.X release.
    */
+  @SuppressWarnings("deprecation")
   protected void addDefaultServlets() {
     // set up default servlets
     addServlet("stacks", "/stacks", StackServlet.class);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/ContextFactory.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/ContextFactory.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/ContextFactory.java
index 034ea35..15ecd61 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/ContextFactory.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/ContextFactory.java
@@ -36,7 +36,10 @@ import org.apache.hadoop.metrics.spi.NullContext;
 /**
  * Factory class for creating MetricsContext objects.  To obtain an instance
  * of this class, use the static <code>getFactory()</code> method.
+ *
+ * @deprecated Use org.apache.hadoop.metrics2 package instead.
  */
+@Deprecated
 @InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce"})
 @InterfaceStability.Evolving
 public class ContextFactory {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/MetricsContext.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/MetricsContext.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/MetricsContext.java
index e297e37..aa08641 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/MetricsContext.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/MetricsContext.java
@@ -30,7 +30,10 @@ import org.apache.hadoop.metrics.spi.OutputRecord;
 
 /**
  * The main interface to the metrics package. 
+ *
+ * @deprecated Use org.apache.hadoop.metrics2 package instead.
  */
+@Deprecated
 @InterfaceAudience.Private
 @InterfaceStability.Evolving
 public interface MetricsContext {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/MetricsException.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/MetricsException.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/MetricsException.java
index de71395..5fcf751 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/MetricsException.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/MetricsException.java
@@ -25,7 +25,9 @@ import org.apache.hadoop.classification.InterfaceStability;
 
 /**
  * General-purpose, unchecked metrics exception.
+ * @deprecated Use {@link org.apache.hadoop.metrics2.MetricsException} instead.
  */
+@Deprecated
 @InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce"})
 @InterfaceStability.Evolving
 public class MetricsException extends RuntimeException {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/MetricsRecord.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/MetricsRecord.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/MetricsRecord.java
index 45701c5..d252a17 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/MetricsRecord.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/MetricsRecord.java
@@ -67,7 +67,10 @@ import org.apache.hadoop.classification.InterfaceStability;
  * it is OK for different threads to call <code>update()</code> on MetricsRecord
instances 
  * with the same set of tag names and tag values.  Different threads should 
  * <b>not</b> use the same MetricsRecord instance at the same time.
+ *
+ * @deprecated Use {@link org.apache.hadoop.metrics2.MetricsRecord} instead.
  */
+@Deprecated
 @InterfaceAudience.Private
 @InterfaceStability.Evolving
 public interface MetricsRecord {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/MetricsServlet.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/MetricsServlet.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/MetricsServlet.java
index 8f5dcd1..b330613 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/MetricsServlet.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/MetricsServlet.java
@@ -43,7 +43,10 @@ import org.mortbay.util.ajax.JSON.Output;
  * A servlet to print out metrics data.  By default, the servlet returns a 
  * textual representation (no promises are made for parseability), and
  * users can use "?format=json" for parseable output.
+ *
+ * @deprecated Use org.apache.hadoop.metrics2 package instead.
  */
+@Deprecated
 @InterfaceAudience.Private
 @InterfaceStability.Evolving
 public class MetricsServlet extends HttpServlet {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/MetricsUtil.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/MetricsUtil.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/MetricsUtil.java
index 14510ae..e079b4c 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/MetricsUtil.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/MetricsUtil.java
@@ -32,7 +32,9 @@ import org.apache.hadoop.classification.InterfaceStability;
  * @see org.apache.hadoop.metrics.MetricsRecord
  * @see org.apache.hadoop.metrics.MetricsContext
  * @see org.apache.hadoop.metrics.ContextFactory
+ * @deprecated Use org.apache.hadoop.metrics2 package instead.
  */
+@Deprecated
 @InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce"})
 @InterfaceStability.Evolving
 public class MetricsUtil {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/Updater.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/Updater.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/Updater.java
index 9c602dd..c1a8017 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/Updater.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/Updater.java
@@ -25,7 +25,10 @@ import org.apache.hadoop.classification.InterfaceStability;
 
 /**
  * Call-back interface.  See <code>MetricsContext.registerUpdater()</code>.
+ *
+ * @deprecated Use org.apache.hadoop.metrics2 package instead.
  */
+@Deprecated
 @InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce"})
 @InterfaceStability.Evolving
 public interface Updater {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/ganglia/GangliaContext.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/ganglia/GangliaContext.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/ganglia/GangliaContext.java
index 5ed2652..7e75d2d 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/ganglia/GangliaContext.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/ganglia/GangliaContext.java
@@ -39,8 +39,11 @@ import org.apache.hadoop.metrics.spi.Util;
 
 /**
  * Context for sending metrics to Ganglia.
- * 
+ *
+ * @deprecated Use {@link org.apache.hadoop.metrics2.sink.ganglia.GangliaSink30}
+ * instead.
  */
+@Deprecated
 @InterfaceAudience.Public
 @InterfaceStability.Evolving
 public class GangliaContext extends AbstractMetricsContext {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/ganglia/GangliaContext31.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/ganglia/GangliaContext31.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/ganglia/GangliaContext31.java
index 4c95ee9..0b1855f 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/ganglia/GangliaContext31.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/ganglia/GangliaContext31.java
@@ -35,7 +35,11 @@ import org.apache.hadoop.net.DNS;
  * Context for sending metrics to Ganglia version 3.1.x.
  * 
  * 3.1.1 has a slightly different wire portal compared to 3.0.x.
+ *
+ * @deprecated Use {@link org.apache.hadoop.metrics2.sink.ganglia.GangliaSink31}
+ * instead.
  */
+@Deprecated
 public class GangliaContext31 extends GangliaContext {
 
   String hostName = "UNKNOWN.example.com";

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/jvm/EventCounter.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/jvm/EventCounter.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/jvm/EventCounter.java
index 599cb82..c6d5ca7 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/jvm/EventCounter.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/jvm/EventCounter.java
@@ -20,7 +20,10 @@ package org.apache.hadoop.metrics.jvm;
 /**
  * A log4J Appender that simply counts logging events in three levels:
  * fatal, error and warn.
+ *
+ * @deprecated Use org.apache.hadoop.metrics2 package instead.
  */
+@Deprecated
 public class EventCounter extends org.apache.hadoop.log.metrics.EventCounter {
 
   static {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/jvm/JvmMetrics.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/jvm/JvmMetrics.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/jvm/JvmMetrics.java
index a518d72..ed9d3c9 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/jvm/JvmMetrics.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/jvm/JvmMetrics.java
@@ -40,7 +40,10 @@ import org.apache.commons.logging.LogFactory;
  * Singleton class which reports Java Virtual Machine metrics to the metrics API.  
  * Any application can create an instance of this class in order to emit
  * Java VM metrics.  
+ *
+ * @deprecated Use {@link org.apache.hadoop.metrics2.source.JvmMetrics} instead.
  */
+@Deprecated
 @InterfaceAudience.Private
 @InterfaceStability.Evolving
 public class JvmMetrics implements Updater {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/AbstractMetricsContext.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/AbstractMetricsContext.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/AbstractMetricsContext.java
index e71cbfe..6841740 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/AbstractMetricsContext.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/AbstractMetricsContext.java
@@ -51,7 +51,10 @@ import org.apache.hadoop.metrics.Updater;
  * on which data is to be sent to the metrics system.  Subclasses must
  * override the abstract <code>emitRecord</code> method in order to transmit
  * the data. <p/>
+ *
+ * @deprecated Use org.apache.hadoop.metrics2 package instead.
  */
+@Deprecated
 @InterfaceAudience.Public
 @InterfaceStability.Evolving
 public abstract class AbstractMetricsContext implements MetricsContext {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/CompositeContext.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/CompositeContext.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/CompositeContext.java
index 53d075d..f9d3442 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/CompositeContext.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/CompositeContext.java
@@ -34,6 +34,10 @@ import org.apache.hadoop.metrics.MetricsRecord;
 import org.apache.hadoop.metrics.MetricsUtil;
 import org.apache.hadoop.metrics.Updater;
 
+/**
+ * @deprecated Use org.apache.hadoop.metrics2 package instead.
+ */
+@Deprecated
 @InterfaceAudience.Public
 @InterfaceStability.Evolving
 public class CompositeContext extends AbstractMetricsContext {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/MetricValue.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/MetricValue.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/MetricValue.java
index 07201c3..865d36c 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/MetricValue.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/MetricValue.java
@@ -26,6 +26,7 @@ import org.apache.hadoop.classification.InterfaceStability;
 /**
  * A Number that is either an absolute or an incremental amount.
  */
+@Deprecated
 @InterfaceAudience.Public
 @InterfaceStability.Evolving
 public class MetricValue {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/MetricsRecordImpl.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/MetricsRecordImpl.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/MetricsRecordImpl.java
index 0c379b6..0732f4e 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/MetricsRecordImpl.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/MetricsRecordImpl.java
@@ -33,7 +33,11 @@ import org.apache.hadoop.metrics.spi.AbstractMetricsContext.TagMap;
  * An implementation of MetricsRecord.  Keeps a back-pointer to the context
  * from which it was created, and delegates back to it on <code>update</code>
  * and <code>remove()</code>.
+ *
+ * @deprecated Use {@link org.apache.hadoop.metrics2.impl.MetricsRecordImpl}
+ * instead.
  */
+@Deprecated
 @InterfaceAudience.Public
 @InterfaceStability.Evolving
 public class MetricsRecordImpl implements MetricsRecord {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/NoEmitMetricsContext.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/NoEmitMetricsContext.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/NoEmitMetricsContext.java
index e7f40c6..821988c 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/NoEmitMetricsContext.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/NoEmitMetricsContext.java
@@ -28,7 +28,10 @@ import org.apache.hadoop.metrics.MetricsServlet;
  * 
  * This is useful if you want to support {@link MetricsServlet}, but
  * not emit metrics in any other way.
+ *
+ * @deprecated Use org.apache.hadoop.metrics2 package instead.
  */
+@Deprecated
 @InterfaceAudience.Public
 @InterfaceStability.Evolving
 public class NoEmitMetricsContext extends AbstractMetricsContext {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/NullContext.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/NullContext.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/NullContext.java
index a3ddda4..d5ccb18 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/NullContext.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/NullContext.java
@@ -27,7 +27,9 @@ import org.apache.hadoop.classification.InterfaceStability;
  * default context, so that no performance data is emitted if no configuration
  * data is found.
  * 
+ * @deprecated Use org.apache.hadoop.metrics2 package instead.
  */
+@Deprecated
 @InterfaceAudience.Public
 @InterfaceStability.Evolving
 public class NullContext extends AbstractMetricsContext {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/NullContextWithUpdateThread.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/NullContextWithUpdateThread.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/NullContextWithUpdateThread.java
index 4504db0..f720b91 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/NullContextWithUpdateThread.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/NullContextWithUpdateThread.java
@@ -33,7 +33,9 @@ import org.apache.hadoop.metrics.ContextFactory;
  * The default impl of start and stop monitoring:
  *  is the AbstractMetricsContext is good enough.
  * 
+ * @deprecated Use org.apache.hadoop.metrics2 package instead.
  */
+@Deprecated
 @InterfaceAudience.Public
 @InterfaceStability.Evolving
 public class NullContextWithUpdateThread extends AbstractMetricsContext {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/OutputRecord.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/OutputRecord.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/OutputRecord.java
index d94c8ab..4f0865e 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/OutputRecord.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/OutputRecord.java
@@ -29,7 +29,10 @@ import org.apache.hadoop.metrics.spi.AbstractMetricsContext.TagMap;
 
 /**
  * Represents a record of metric data to be sent to a metrics system.
+ *
+ * @deprecated Use org.apache.hadoop.metrics2 package instead.
  */
+@Deprecated
 @InterfaceAudience.Public
 @InterfaceStability.Evolving
 public class OutputRecord {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/Util.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/Util.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/Util.java
index 32aa431..6fb7c9e 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/Util.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/spi/Util.java
@@ -31,7 +31,10 @@ import org.apache.hadoop.net.NetUtils;
 
 /**
  * Static utility methods
+ *
+ * @deprecated Use org.apache.hadoop.metrics2 package instead.
  */
+@Deprecated
 @InterfaceAudience.Public
 @InterfaceStability.Evolving
 public class Util {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MBeanUtil.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MBeanUtil.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MBeanUtil.java
index 2032d8f..7746b4f 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MBeanUtil.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MBeanUtil.java
@@ -33,7 +33,9 @@ import org.apache.hadoop.classification.InterfaceAudience;
  * our standard naming convention as described in the doc
  *  for {link {@link #registerMBean(String, String, Object)}
  *
+ * @deprecated Use {@link org.apache.hadoop.metrics2.util.MBeans} instead.
  */
+@Deprecated
 @InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce"})
 public class MBeanUtil {
 	

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsBase.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsBase.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsBase.java
index 93e8494..96d7b61 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsBase.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsBase.java
@@ -24,7 +24,9 @@ import org.apache.hadoop.metrics.MetricsRecord;
  * 
  * This is base class for all metrics
  *
+ * @deprecated Use org.apache.hadoop.metrics2 package instead.
  */
+@Deprecated
 @InterfaceAudience.Private
 public abstract class MetricsBase {
   public static final String NO_DESCRIPTION = "NoDescription";

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsDynamicMBeanBase.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsDynamicMBeanBase.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsDynamicMBeanBase.java
index 9c9164e..24932d6 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsDynamicMBeanBase.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsDynamicMBeanBase.java
@@ -51,8 +51,9 @@ import org.apache.hadoop.metrics.MetricsUtil;
  *  ObjectName mbeanName = MBeanUtil.registerMBean("ServiceFoo",
  *                "TestStatistics", theMBean);
  * 
- *
+ * @deprecated Use org.apache.hadoop.metrics2 package instead.
  */
+@Deprecated
 @InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce"})
 public abstract class MetricsDynamicMBeanBase implements DynamicMBean {
   private final static String AVG_TIME = "AvgTime";

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsIntValue.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsIntValue.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsIntValue.java
index 82d83b0..2199346 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsIntValue.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsIntValue.java
@@ -28,7 +28,9 @@ import org.apache.commons.logging.LogFactory;
  * Each time its value is set, it is published only *once* at the next update
  * call.
  *
+ * @deprecated Use org.apache.hadoop.metrics2 package instead.
  */
+@Deprecated
 @InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce"})
 public class MetricsIntValue extends MetricsBase {  
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsLongValue.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsLongValue.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsLongValue.java
index 90e7419..dcdec00 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsLongValue.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsLongValue.java
@@ -27,7 +27,9 @@ import org.apache.hadoop.metrics.MetricsRecord;
  * Each time its value is set, it is published only *once* at the next update
  * call.
  *
+ * @deprecated Use org.apache.hadoop.metrics2 package instead.
  */
+@Deprecated
 @InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce"})
 public class MetricsLongValue extends MetricsBase{  
   private long value;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsRegistry.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsRegistry.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsRegistry.java
index 58f1929..2baa3d3 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsRegistry.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsRegistry.java
@@ -28,7 +28,9 @@ import org.apache.hadoop.classification.InterfaceAudience;
  * 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 Use org.apache.hadoop.metrics2 package instead.
  */
+@Deprecated
 @InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce"})
 public class MetricsRegistry {
   private ConcurrentHashMap<String, MetricsBase> metricsList =

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsTimeVaryingInt.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsTimeVaryingInt.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsTimeVaryingInt.java
index d3e5bd2..30a5f61 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsTimeVaryingInt.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsTimeVaryingInt.java
@@ -31,8 +31,9 @@ import org.apache.commons.logging.LogFactory;
  * 
  * Note if one wants a time associated with the metric then use
  * @see org.apache.hadoop.metrics.util.MetricsTimeVaryingRate
- *
+ * @deprecated Use org.apache.hadoop.metrics2 package instead.
  */
+@Deprecated
 @InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce"})
 public class MetricsTimeVaryingInt extends MetricsBase {
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsTimeVaryingLong.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsTimeVaryingLong.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsTimeVaryingLong.java
index e74883f..ad2fdf6 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsTimeVaryingLong.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsTimeVaryingLong.java
@@ -32,8 +32,9 @@ import org.apache.commons.logging.LogFactory;
  * 
  * Note if one wants a time associated with the metric then use
  * @see org.apache.hadoop.metrics.util.MetricsTimeVaryingRate
- *
+ * @deprecated Use org.apache.hadoop.metrics2 package instead.
  */
+@Deprecated
 @InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce"})
 public class MetricsTimeVaryingLong extends MetricsBase{
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsTimeVaryingRate.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsTimeVaryingRate.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsTimeVaryingRate.java
index a4e7671..5f50998 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsTimeVaryingRate.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics/util/MetricsTimeVaryingRate.java
@@ -30,7 +30,9 @@ import org.apache.commons.logging.LogFactory;
  * This class also keeps track of the min and max rates along with 
  * a method to reset the min-max.
  *
+ * @deprecated Use org.apache.hadoop.metrics2 package instead.
  */
+@Deprecated
 @InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce"})
 public class MetricsTimeVaryingRate extends MetricsBase {
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics/TestMetricsServlet.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics/TestMetricsServlet.java
b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics/TestMetricsServlet.java
index ec54f59..b2ea9df 100644
--- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics/TestMetricsServlet.java
+++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics/TestMetricsServlet.java
@@ -32,6 +32,7 @@ import org.apache.hadoop.metrics.spi.NoEmitMetricsContext;
 import org.apache.hadoop.metrics.spi.OutputRecord;
 import org.mortbay.util.ajax.JSON;
 
+@Deprecated
 public class TestMetricsServlet extends TestCase {
   MetricsContext nc1;
   MetricsContext nc2;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics/ganglia/TestGangliaContext.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics/ganglia/TestGangliaContext.java
b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics/ganglia/TestGangliaContext.java
index 8637f8c..bae3ec0 100644
--- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics/ganglia/TestGangliaContext.java
+++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics/ganglia/TestGangliaContext.java
@@ -32,6 +32,7 @@ import org.apache.hadoop.metrics.spi.AbstractMetricsContext;
 
 import java.net.MulticastSocket;
 
+@Deprecated
 public class TestGangliaContext {
   @Test
   public void testShouldCreateDatagramSocketByDefault() throws Exception {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/de739cab/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics/spi/TestOutputRecord.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics/spi/TestOutputRecord.java
b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics/spi/TestOutputRecord.java
index 02e94a9..9747cb9 100644
--- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics/spi/TestOutputRecord.java
+++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics/spi/TestOutputRecord.java
@@ -22,6 +22,7 @@ import org.apache.hadoop.metrics.spi.AbstractMetricsContext.TagMap;
 
 import junit.framework.TestCase;
 
+@Deprecated
 public class TestOutputRecord extends TestCase {
   public void testCopy() {
     TagMap tags = new TagMap();


Mime
View raw message