hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhr...@apache.org
Subject svn commit: r632190 - in /hadoop/core/branches/branch-0.16: CHANGES.txt src/java/org/apache/hadoop/ipc/metrics/RpcMetrics.java
Date Fri, 29 Feb 2008 01:02:22 GMT
Author: dhruba
Date: Thu Feb 28 17:02:21 2008
New Revision: 632190

URL: http://svn.apache.org/viewvc?rev=632190&view=rev
Log:
HADOOP-2904.  Fix to RPC metrics to log the correct host name.
(girish vaitheeswaran via dhruba)
svn merge -c 632184


Modified:
    hadoop/core/branches/branch-0.16/CHANGES.txt
    hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/ipc/metrics/RpcMetrics.java

Modified: hadoop/core/branches/branch-0.16/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.16/CHANGES.txt?rev=632190&r1=632189&r2=632190&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.16/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.16/CHANGES.txt Thu Feb 28 17:02:21 2008
@@ -82,6 +82,9 @@
     HADOOP-2903.  Fix exception generated by Metrics while using pushMetric().
     (girish vaitheeswaran via dhruba)
 
+    HADOOP-2904.  Fix to RPC metrics to log the correct host name. 
+    (girish vaitheeswaran via dhruba)
+
 Release 0.16.0 - 2008-02-07
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/ipc/metrics/RpcMetrics.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/ipc/metrics/RpcMetrics.java?rev=632190&r1=632189&r2=632190&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/ipc/metrics/RpcMetrics.java
(original)
+++ hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/ipc/metrics/RpcMetrics.java
Thu Feb 28 17:02:21 2008
@@ -41,24 +41,22 @@
  */
 public class RpcMetrics implements Updater {
   private MetricsRecord metricsRecord;
-  private static Log LOG = LogFactory.getLog(JvmMetrics.class);
+  private static Log LOG = LogFactory.getLog(RpcMetrics.class);
   RpcMgt rpcMgt;
   
-  private void setTags(String serverName, String port) {
-    metricsRecord.setTag("serverName", serverName);
-    metricsRecord.setTag("port", port);
-    LOG.info("Initializing RPC Metrics with serverName=" 
-        + serverName + ", port=" + port);
-  }
-
-  public RpcMetrics(String serverName, String port, Server server) {
+  public RpcMetrics(String hostName, String port, Server server) {
     MetricsContext context = MetricsUtil.getContext("rpc");
     metricsRecord = MetricsUtil.createRecord(context, "metrics");
-    setTags(serverName, port);
+
+    metricsRecord.setTag("port", port);
+
+    LOG.info("Initializing RPC Metrics with hostName=" 
+        + hostName + ", port=" + port);
+
     context.registerUpdater(this);
     
     // Need to clean up the interface to RpcMgt - don't need both metrics and server params
-    rpcMgt = new RpcMgt(serverName, port, this, server);
+    rpcMgt = new RpcMgt(hostName, port, this, server);
   }
   
   



Mime
View raw message