HADOOP-7266. Deprecate metrics v1. Contributed by Akira AJISAKA.
This commit is contained in:
parent
124a412a37
commit
35a303dfbe
@ -905,6 +905,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
|
||||
|
@ -541,7 +541,9 @@ private void setContextAttributes(Context context, Configuration conf) {
|
||||
|
||||
/**
|
||||
* 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);
|
||||
|
@ -36,7 +36,10 @@
|
||||
/**
|
||||
* 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 {
|
||||
|
@ -30,7 +30,10 @@
|
||||
|
||||
/**
|
||||
* The main interface to the metrics package.
|
||||
*
|
||||
* @deprecated Use org.apache.hadoop.metrics2 package instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@InterfaceAudience.Private
|
||||
@InterfaceStability.Evolving
|
||||
public interface MetricsContext {
|
||||
|
@ -25,7 +25,9 @@
|
||||
|
||||
/**
|
||||
* 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 {
|
||||
|
@ -67,7 +67,10 @@
|
||||
* 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 {
|
||||
|
@ -43,7 +43,10 @@
|
||||
* 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 {
|
||||
|
@ -32,7 +32,9 @@
|
||||
* @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 {
|
||||
|
@ -25,7 +25,10 @@
|
||||
|
||||
/**
|
||||
* 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 {
|
||||
|
@ -39,8 +39,11 @@
|
||||
|
||||
/**
|
||||
* 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 {
|
||||
|
@ -35,7 +35,11 @@
|
||||
* 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";
|
||||
|
@ -20,7 +20,10 @@
|
||||
/**
|
||||
* 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 {
|
||||
|
@ -40,7 +40,10 @@
|
||||
* 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 {
|
||||
|
@ -51,7 +51,10 @@
|
||||
* 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 {
|
||||
|
@ -34,6 +34,10 @@
|
||||
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 {
|
||||
|
@ -26,6 +26,7 @@
|
||||
/**
|
||||
* A Number that is either an absolute or an incremental amount.
|
||||
*/
|
||||
@Deprecated
|
||||
@InterfaceAudience.Public
|
||||
@InterfaceStability.Evolving
|
||||
public class MetricValue {
|
||||
|
@ -33,7 +33,11 @@
|
||||
* 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 {
|
||||
|
@ -28,7 +28,10 @@
|
||||
*
|
||||
* 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 {
|
||||
|
@ -27,7 +27,9 @@
|
||||
* 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 {
|
||||
|
@ -33,7 +33,9 @@
|
||||
* 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 {
|
||||
|
@ -29,7 +29,10 @@
|
||||
|
||||
/**
|
||||
* 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 {
|
||||
|
@ -31,7 +31,10 @@
|
||||
|
||||
/**
|
||||
* Static utility methods
|
||||
*
|
||||
* @deprecated Use org.apache.hadoop.metrics2 package instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@InterfaceAudience.Public
|
||||
@InterfaceStability.Evolving
|
||||
public class Util {
|
||||
|
@ -33,7 +33,9 @@
|
||||
* 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 {
|
||||
|
||||
|
@ -24,7 +24,9 @@
|
||||
*
|
||||
* 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";
|
||||
|
@ -51,8 +51,9 @@
|
||||
* 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";
|
||||
|
@ -28,7 +28,9 @@
|
||||
* 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 {
|
||||
|
||||
|
@ -27,7 +27,9 @@
|
||||
* 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;
|
||||
|
@ -28,7 +28,9 @@
|
||||
* 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 =
|
||||
|
@ -31,8 +31,9 @@
|
||||
*
|
||||
* 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 {
|
||||
|
||||
|
@ -32,8 +32,9 @@
|
||||
*
|
||||
* 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{
|
||||
|
||||
|
@ -30,7 +30,9 @@
|
||||
* 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 {
|
||||
|
||||
|
@ -32,6 +32,7 @@
|
||||
import org.apache.hadoop.metrics.spi.OutputRecord;
|
||||
import org.mortbay.util.ajax.JSON;
|
||||
|
||||
@Deprecated
|
||||
public class TestMetricsServlet extends TestCase {
|
||||
MetricsContext nc1;
|
||||
MetricsContext nc2;
|
||||
|
@ -32,6 +32,7 @@
|
||||
|
||||
import java.net.MulticastSocket;
|
||||
|
||||
@Deprecated
|
||||
public class TestGangliaContext {
|
||||
@Test
|
||||
public void testShouldCreateDatagramSocketByDefault() throws Exception {
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
@Deprecated
|
||||
public class TestOutputRecord extends TestCase {
|
||||
public void testCopy() {
|
||||
TagMap tags = new TagMap();
|
||||
|
Loading…
Reference in New Issue
Block a user