hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edwardy...@apache.org
Subject svn commit: r1401149 - in /hama/trunk: bin/grooms.sh core/src/main/java/org/apache/hama/GroomServerRunner.java
Date Tue, 23 Oct 2012 03:35:39 GMT
Author: edwardyoon
Date: Tue Oct 23 03:35:38 2012
New Revision: 1401149

URL: http://svn.apache.org/viewvc?rev=1401149&view=rev
Log:
HAMA-657: Daemon's hostname should be configurable

Modified:
    hama/trunk/bin/grooms.sh
    hama/trunk/core/src/main/java/org/apache/hama/GroomServerRunner.java

Modified: hama/trunk/bin/grooms.sh
URL: http://svn.apache.org/viewvc/hama/trunk/bin/grooms.sh?rev=1401149&r1=1401148&r2=1401149&view=diff
==============================================================================
--- hama/trunk/bin/grooms.sh (original)
+++ hama/trunk/bin/grooms.sh Tue Oct 23 03:35:38 2012
@@ -58,7 +58,7 @@ if [ "$HOSTLIST" = "" ]; then
 fi
 
 for groom in `cat "$HOSTLIST"|sed  "s/#.*$//;/^$/d"`; do
- ssh $HAMA_SSH_OPTS $groom $"${@// /\\ }" \
+ ssh $HAMA_SSH_OPTS $groom $"${@// /\\ }" $groom \
    2>&1 | sed "s/^/$groom: /" &
  if [ "$HAMA_GROOM_SLEEP" != "" ]; then
    sleep $HAMA_GROOM_SLEEP

Modified: hama/trunk/core/src/main/java/org/apache/hama/GroomServerRunner.java
URL: http://svn.apache.org/viewvc/hama/trunk/core/src/main/java/org/apache/hama/GroomServerRunner.java?rev=1401149&r1=1401148&r2=1401149&view=diff
==============================================================================
--- hama/trunk/core/src/main/java/org/apache/hama/GroomServerRunner.java (original)
+++ hama/trunk/core/src/main/java/org/apache/hama/GroomServerRunner.java Tue Oct 23 03:35:38
2012
@@ -37,13 +37,13 @@ public class GroomServerRunner extends C
   public int run(String[] args) throws Exception {
     StringUtils.startupShutdownMessage(GroomServer.class, args, LOG);
 
-    if (args.length != 0) {
-      System.out.println("usage: GroomServerRunner");
-      System.exit(-1);
-    }
-
     try {
       Configuration conf = new HamaConfiguration(getConf());
+
+      if (args.length == 1) {
+        conf.set("bsp.peer.hostname", args[0]);
+      }
+
       GroomServer groom = GroomServer.constructGroomServer(GroomServer.class,
           conf);
       GroomServer.startGroomServer(groom).join();



Mime
View raw message