Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fixed login with instance id

  • Loading branch information...
commit 00d657bd26a73c698e867d2c1af6cc63689387a6 1 parent 8e1eed2
cory cyr authored March 13, 2011
4  bin/pooper.sh
@@ -58,5 +58,7 @@ if [ "$1" == "login" ] ; then
58 58
 else
59 59
 	COMMAND="$JAVA  $JAVA_OPTS -jar $POOPER_JAR $1 $2 $3 $4 $5 $6"
60 60
 fi
61  
-
  61
+#echo "COMMAND:"
  62
+#echo "$COMMAND"
  63
+#echo "--------"
62 64
 exec $COMMAND
2  config/log4j.properties
@@ -2,4 +2,4 @@ log4j.rootLogger=WARN, A1
2 2
 log4j.appender.A1=org.apache.log4j.ConsoleAppender
3 3
 log4j.appender.A1.layout=org.apache.log4j.PatternLayout
4 4
 log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c -  %m%n
5  
-log4j.com.lunabeat.dooper.HadoopCluster.logger=INFO, A1
  5
+
11  src/com/lunabeat/pooper/commands/AppCommand.java
@@ -483,14 +483,17 @@ private void createGroups(String clusterName) {
483 483
 	private void getLoginCommand(String target) {
484 484
 		String host = null;
485 485
 		HadoopCluster cluster = new HadoopCluster(target, _config);
486  
-		if(cluster.groupsExist())
  486
+		if(cluster.groupsExist()){
487 487
 			if(cluster.getMaster() != null)
488 488
 				host = cluster.getMaster().getInstance().getPublicDnsName();
489  
-		else if(target.startsWith(ClusterConfig.EC2_INSTANCE_PREFIX)){
  489
+		}else if(target.startsWith(ClusterConfig.EC2_INSTANCE_PREFIX)){
490 490
 			DescribeInstancesResult ir = cluster.getInstanceForId(target);
491  
-			if(ir.getReservations().size() > 0)
492  
-				if(ir.getReservations().get(0).getInstances().size() > 0)
  491
+			LOG.info(ir.toString());
  492
+			if(ir.getReservations().size() > 0){
  493
+				if(ir.getReservations().get(0).getInstances().size() > 0){
493 494
 					host = ir.getReservations().get(0).getInstances().get(0).getPublicDnsName();
  495
+				}
  496
+			}
494 497
 		}
495 498
 		if(host == null){
496 499
 			System.out.println("'" + target + "' is not a valid cluster name or instance id.\nexiting.");

0 notes on commit 00d657b

Please sign in to comment.
Something went wrong with that request. Please try again.