hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vino...@apache.org
Subject svn commit: r1130417 - in /hadoop/mapreduce/branches/MR-279: CHANGES.txt yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/logaggregation/LogAggregationService.java
Date Thu, 02 Jun 2011 06:32:51 GMT
Author: vinodkv
Date: Thu Jun  2 06:32:51 2011
New Revision: 1130417

URL: http://svn.apache.org/viewvc?rev=1130417&view=rev
Log:
Making each node aggregate all its user-logs to a separate hdfs file. (vinodkv)

Modified:
    hadoop/mapreduce/branches/MR-279/CHANGES.txt
    hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/logaggregation/LogAggregationService.java

Modified: hadoop/mapreduce/branches/MR-279/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/MR-279/CHANGES.txt?rev=1130417&r1=1130416&r2=1130417&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/CHANGES.txt (original)
+++ hadoop/mapreduce/branches/MR-279/CHANGES.txt Thu Jun  2 06:32:51 2011
@@ -5,6 +5,9 @@ Trunk (unreleased changes)
 
     MAPREDUCE-279
 
+    Making each node aggregate all its user-logs to a separate hdfs
+    file. (vinodkv)
+
     Fix for NPE in TestNMExpiry (siddharth seth)
 
     Fix another NPE in TestRMNMRPCResponseId. (mahadev)

Modified: hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/logaggregation/LogAggregationService.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/logaggregation/LogAggregationService.java?rev=1130417&r1=1130416&r2=1130417&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/logaggregation/LogAggregationService.java
(original)
+++ hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/logaggregation/LogAggregationService.java
Thu Jun  2 06:32:51 2011
@@ -21,6 +21,9 @@ package org.apache.hadoop.yarn.server.no
 import static org.apache.hadoop.yarn.server.nodemanager.NMConfig.DEFAULT_NM_BIND_ADDRESS;
 import static org.apache.hadoop.yarn.server.nodemanager.NMConfig.NM_BIND_ADDRESS;
 
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.net.UnknownHostException;
 import java.security.PrivilegedExceptionAction;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
@@ -32,6 +35,7 @@ import org.apache.commons.logging.LogFac
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.net.NetUtils;
 import org.apache.hadoop.security.Credentials;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.security.token.Token;
@@ -93,8 +97,14 @@ public class LogAggregationService exten
   public synchronized void start() {
     String address =
         getConfig().get(NM_BIND_ADDRESS, DEFAULT_NM_BIND_ADDRESS);
-    String[] splits = address.split(":");
-    this.nodeFile = splits[0] + "_" + splits[1];
+    InetSocketAddress cmBindAddress = NetUtils.createSocketAddr(address);
+    try {
+      this.nodeFile =
+          InetAddress.getLocalHost().getHostAddress() + "_"
+              + cmBindAddress.getPort();
+    } catch (UnknownHostException e) {
+      throw new YarnException(e);
+    }
     super.start();
   }
 



Mime
View raw message