You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@twill.apache.org by ch...@apache.org on 2015/05/21 07:32:03 UTC
[4/4] incubator-twill git commit: Added more logs to help debug.
Added more logs to help debug.
Project: http://git-wip-us.apache.org/repos/asf/incubator-twill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-twill/commit/e4c447f2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-twill/tree/e4c447f2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-twill/diff/e4c447f2
Branch: refs/heads/feature/TWILL-83
Commit: e4c447f210691aae9ea3c77fd09deaf75daa39b3
Parents: c370725
Author: Terence Yim <ch...@apache.org>
Authored: Wed May 20 22:31:51 2015 -0700
Committer: Terence Yim <ch...@apache.org>
Committed: Wed May 20 22:31:51 2015 -0700
----------------------------------------------------------------------
.../java/org/apache/twill/yarn/ServiceDiscoveryTestRun.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-twill/blob/e4c447f2/twill-yarn/src/test/java/org/apache/twill/yarn/ServiceDiscoveryTestRun.java
----------------------------------------------------------------------
diff --git a/twill-yarn/src/test/java/org/apache/twill/yarn/ServiceDiscoveryTestRun.java b/twill-yarn/src/test/java/org/apache/twill/yarn/ServiceDiscoveryTestRun.java
index f1457c5..e4618d0 100644
--- a/twill-yarn/src/test/java/org/apache/twill/yarn/ServiceDiscoveryTestRun.java
+++ b/twill-yarn/src/test/java/org/apache/twill/yarn/ServiceDiscoveryTestRun.java
@@ -84,10 +84,13 @@ public final class ServiceDiscoveryTestRun extends BaseYarnTest {
@Override
public void run() {
+ final String runnableName = getContext().getSpecification().getName();
+ LOG.info("Runnable running: {}", runnableName);
try {
this.runThread = Thread.currentThread();
final int port = Integer.parseInt(getContext().getArguments()[0]);
getContext().announce(SERVICE_NAME, port);
+ LOG.info("{} announced at {}", runnableName, port);
final CountDownLatch discoveredLatch = new CountDownLatch(1);
@@ -96,10 +99,11 @@ public final class ServiceDiscoveryTestRun extends BaseYarnTest {
@Override
public void onChange(ServiceDiscovered serviceDiscovered) {
// Try to find a discoverable that is not this instance
+ LOG.info("{}: Discoverable changed", runnableName);
for (Discoverable discoverable : serviceDiscovered) {
int discoveredPort = discoverable.getSocketAddress().getPort();
+ LOG.info("{}: Service discovered at {}", runnableName, discoveredPort);
if (SERVICE_NAME.equals(discoverable.getName()) && discoveredPort != port) {
- LOG.info("{}: Service discovered at {}", getContext().getSpecification().getName(), discoveredPort);
discoveredLatch.countDown();
}
}