hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhr...@apache.org
Subject svn commit: r632184 - in /hadoop/core/trunk: CHANGES.txt src/java/org/apache/hadoop/ipc/metrics/RpcMetrics.java
Date Fri, 29 Feb 2008 00:42:43 GMT
Author: dhruba
Date: Thu Feb 28 16:42:41 2008
New Revision: 632184

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


Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/java/org/apache/hadoop/ipc/metrics/RpcMetrics.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=632184&r1=632183&r2=632184&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Thu Feb 28 16:42:41 2008
@@ -91,6 +91,9 @@
 
     HADOOP-2891.  DFSClient.close() closes all open files. (dhruba)
 
+    HADOOP-2904.  Fix to RPC metrics to log the correct host name. 
+    (girish vaitheeswaran via dhruba)
+
 Release 0.16.1 - Unreleased
 
   IMPROVEMENTS

Modified: hadoop/core/trunk/src/java/org/apache/hadoop/ipc/metrics/RpcMetrics.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/java/org/apache/hadoop/ipc/metrics/RpcMetrics.java?rev=632184&r1=632183&r2=632184&view=diff
==============================================================================
--- hadoop/core/trunk/src/java/org/apache/hadoop/ipc/metrics/RpcMetrics.java (original)
+++ hadoop/core/trunk/src/java/org/apache/hadoop/ipc/metrics/RpcMetrics.java Thu Feb 28 16:42:41
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