hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r1145524 - in /hadoop/common/branches/branch-0.20-security/src: core/org/apache/hadoop/metrics2/sink/ganglia/ test/org/apache/hadoop/metrics2/impl/ test/org/apache/hadoop/metrics2/sink/ganglia/
Date Tue, 12 Jul 2011 10:23:03 GMT
Author: llu
Date: Tue Jul 12 10:23:03 2011
New Revision: 1145524

URL: http://svn.apache.org/viewvc?rev=1145524&view=rev
Log:
Rename TestGangliaMetricsHelper to GangliaMetricsTestHelper.

Added:
    hadoop/common/branches/branch-0.20-security/src/test/org/apache/hadoop/metrics2/sink/ganglia/GangliaMetricsTestHelper.java
      - copied, changed from r1144086, hadoop/common/branches/branch-0.20-security/src/test/org/apache/hadoop/metrics2/sink/ganglia/TestGangliaMetricsHelper.java
Removed:
    hadoop/common/branches/branch-0.20-security/src/test/org/apache/hadoop/metrics2/sink/ganglia/TestGangliaMetricsHelper.java
Modified:
    hadoop/common/branches/branch-0.20-security/src/core/org/apache/hadoop/metrics2/sink/ganglia/GangliaMetricVisitor.java
    hadoop/common/branches/branch-0.20-security/src/test/org/apache/hadoop/metrics2/impl/TestGangliaMetrics.java

Modified: hadoop/common/branches/branch-0.20-security/src/core/org/apache/hadoop/metrics2/sink/ganglia/GangliaMetricVisitor.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security/src/core/org/apache/hadoop/metrics2/sink/ganglia/GangliaMetricVisitor.java?rev=1145524&r1=1145523&r2=1145524&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security/src/core/org/apache/hadoop/metrics2/sink/ganglia/GangliaMetricVisitor.java
(original)
+++ hadoop/common/branches/branch-0.20-security/src/core/org/apache/hadoop/metrics2/sink/ganglia/GangliaMetricVisitor.java
Tue Jul 12 10:23:03 2011
@@ -51,18 +51,14 @@ class GangliaMetricVisitor implements Me
     return slope;
   }
 
-  /* (non-Javadoc)
-   * @see org.apache.hadoop.metrics2.MetricsVisitor#gauge(org.apache.hadoop.metrics2.MetricGauge,
int)
-   */
+  @Override
   public void gauge(MetricGauge<Integer> metric, int value) {
     // MetricGaugeInt.class ==> "int32"
     type = INT32;
     slope = null; // set to null as cannot figure out from Metric
   }
 
-  /* (non-Javadoc)
-   * @see org.apache.hadoop.metrics2.MetricsVisitor#counter(org.apache.hadoop.metrics2.MetricCounter,
int)
-   */
+  @Override
   public void counter(MetricCounter<Integer> metric, int value) {
     // MetricCounterInt.class ==> "int32"
     type = INT32;
@@ -71,18 +67,14 @@ class GangliaMetricVisitor implements Me
     slope = GangliaSlope.positive;
   }
 
-  /* (non-Javadoc)
-   * @see org.apache.hadoop.metrics2.MetricsVisitor#gauge(org.apache.hadoop.metrics2.MetricGauge,
long)
-   */
+  @Override
   public void gauge(MetricGauge<Long> metric, long value) {
     // MetricGaugeLong.class ==> "float"
     type = FLOAT;
     slope = null; // set to null as cannot figure out from Metric
   }
 
-  /* (non-Javadoc)
-   * @see org.apache.hadoop.metrics2.MetricsVisitor#counter(org.apache.hadoop.metrics2.MetricCounter,
long)
-   */
+  @Override
   public void counter(MetricCounter<Long> metric, long value) {
     // MetricCounterLong.class ==> "float"
     type = FLOAT;
@@ -91,18 +83,14 @@ class GangliaMetricVisitor implements Me
     slope = GangliaSlope.positive;
   }
 
-  /* (non-Javadoc)
-   * @see org.apache.hadoop.metrics2.MetricsVisitor#gauge(org.apache.hadoop.metrics2.MetricGauge,
float)
-   */
+  @Override
   public void gauge(MetricGauge<Float> metric, float value) {
     // MetricGaugeFloat.class ==> "float"
     type = FLOAT;
     slope = null; // set to null as cannot figure out from Metric
   }
 
-  /* (non-Javadoc)
-   * @see org.apache.hadoop.metrics2.MetricsVisitor#gauge(org.apache.hadoop.metrics2.MetricGauge,
double)
-   */
+  @Override
   public void gauge(MetricGauge<Double> metric, double value) {
     // MetricGaugeDouble.class ==> "double"
     type = DOUBLE;

Modified: hadoop/common/branches/branch-0.20-security/src/test/org/apache/hadoop/metrics2/impl/TestGangliaMetrics.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security/src/test/org/apache/hadoop/metrics2/impl/TestGangliaMetrics.java?rev=1145524&r1=1145523&r2=1145524&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security/src/test/org/apache/hadoop/metrics2/impl/TestGangliaMetrics.java
(original)
+++ hadoop/common/branches/branch-0.20-security/src/test/org/apache/hadoop/metrics2/impl/TestGangliaMetrics.java
Tue Jul 12 10:23:03 2011
@@ -36,7 +36,7 @@ import org.apache.hadoop.metrics2.lib.Me
 import org.apache.hadoop.metrics2.sink.ganglia.AbstractGangliaSink;
 import org.apache.hadoop.metrics2.sink.ganglia.GangliaSink30;
 import org.apache.hadoop.metrics2.sink.ganglia.GangliaSink31;
-import org.apache.hadoop.metrics2.sink.ganglia.TestGangliaMetricsHelper;
+import org.apache.hadoop.metrics2.sink.ganglia.GangliaMetricsTestHelper;
 import org.junit.Test;
 
 public class TestGangliaMetrics {
@@ -61,12 +61,12 @@ public class TestGangliaMetrics {
     AbstractGangliaSink gsink30 = new GangliaSink30();
     gsink30.init(cb.subset("test"));
     MockDatagramSocket mockds30 = new MockDatagramSocket();
-    TestGangliaMetricsHelper.setDatagramSocket(gsink30, mockds30);
+    GangliaMetricsTestHelper.setDatagramSocket(gsink30, mockds30);
 
     AbstractGangliaSink gsink31 = new GangliaSink31();
     gsink31.init(cb.subset("test"));
     MockDatagramSocket mockds31 = new MockDatagramSocket();
-    TestGangliaMetricsHelper.setDatagramSocket(gsink31, mockds31);
+    GangliaMetricsTestHelper.setDatagramSocket(gsink31, mockds31);
 
     ms.register("gsink30", "gsink30 desc", gsink30);
     ms.register("gsink31", "gsink31 desc", gsink31);

Copied: hadoop/common/branches/branch-0.20-security/src/test/org/apache/hadoop/metrics2/sink/ganglia/GangliaMetricsTestHelper.java
(from r1144086, hadoop/common/branches/branch-0.20-security/src/test/org/apache/hadoop/metrics2/sink/ganglia/TestGangliaMetricsHelper.java)
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security/src/test/org/apache/hadoop/metrics2/sink/ganglia/GangliaMetricsTestHelper.java?p2=hadoop/common/branches/branch-0.20-security/src/test/org/apache/hadoop/metrics2/sink/ganglia/GangliaMetricsTestHelper.java&p1=hadoop/common/branches/branch-0.20-security/src/test/org/apache/hadoop/metrics2/sink/ganglia/TestGangliaMetricsHelper.java&r1=1144086&r2=1145524&rev=1145524&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security/src/test/org/apache/hadoop/metrics2/sink/ganglia/TestGangliaMetricsHelper.java
(original)
+++ hadoop/common/branches/branch-0.20-security/src/test/org/apache/hadoop/metrics2/sink/ganglia/GangliaMetricsTestHelper.java
Tue Jul 12 10:23:03 2011
@@ -23,7 +23,7 @@ import java.net.DatagramSocket;
 /**
  * Helper class in the same package as ganglia sinks to be used by unit tests
  */
-public class TestGangliaMetricsHelper {
+public class GangliaMetricsTestHelper {
 
   /**
    * Helper method to access package private method to set DatagramSocket



Mime
View raw message