Skip to content

Commit

Permalink
Minor fixes (ZkTool).
Browse files Browse the repository at this point in the history
  • Loading branch information
dybdahl committed Sep 26, 2012
1 parent 8c32305 commit 3fae1f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 0 additions & 1 deletion cn/src/main/java/org/cloudname/Cloudname.java
Expand Up @@ -15,7 +15,6 @@ public interface Cloudname {
* Cloudname cn = ...
* Coordinate coordinate = ...
* ServiceHandle serviceHandle = cn.claim(coordinate);
* final CountDownLatch latch = new CountDownLatch(1);
* boolean claimSuccess = serviceHandle.waitForCoordinateOkSeconds(10);
*
* @param coordinate of the service we wish to claim.
Expand Down
12 changes: 10 additions & 2 deletions cn/src/main/java/org/cloudname/zk/ZkTool.java
Expand Up @@ -7,6 +7,7 @@
import org.cloudname.*;
import org.cloudname.flags.Flag;
import org.cloudname.flags.Flags;
import org.omg.CORBA.SystemException;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
Expand Down Expand Up @@ -279,12 +280,19 @@ public void close() throws IOException { }
break;

} catch (CoordinateMissingException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
System.err.println("Non-existing coordinate.");
}
System.err.println("Created coordinate.");
System.err.println("Config updated.");
break;

case READ_CONFIG:
try {
System.out.println("Config is:" + cloudname.getConfig(Coordinate.parse(coordinateFlag)));
} catch (CoordinateMissingException e) {
System.err.println("Non-existing coordinate.");
} catch (CloudnameException e) {
System.err.println("Problem with cloudname: " + e.getMessage());
}
break;
}
try {
Expand Down

0 comments on commit 3fae1f8

Please sign in to comment.