This is an automated email from the ASF dual-hosted git repository.

taegeonum pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nemo.git


The following commit(s) were added to refs/heads/master by this push:
     new 08ff41d  [NEMO-221] Confusing error messages for a failure at the 
client-side initialization (#165)
08ff41d is described below

commit 08ff41dea77048733595d8d25613d6b1aa952ef6
Author: Yunseong Lee <[email protected]>
AuthorDate: Tue Dec 11 09:12:07 2018 +0900

    [NEMO-221] Confusing error messages for a failure at the client-side 
initialization (#165)
    
    JIRA: [NEMO-221: Confusing error messages for a failure at the client-side 
initialization](https://issues.apache.org/jira/projects/NEMO/issues/NEMO-221)
    
    **Major changes:**
    - Throw a separate Exception if failed to create an RPC connection between 
Nemo client and REEF Driver (currently the IOException is swallowed by Tang's 
Injection Exception). This way, we can find the actual reason for the failure, 
although the beginning of the stack trace is still pretty lengthy with the 
network failure.
---
 .../src/main/java/org/apache/nemo/runtime/master/ClientRPC.java  | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git 
a/runtime/master/src/main/java/org/apache/nemo/runtime/master/ClientRPC.java 
b/runtime/master/src/main/java/org/apache/nemo/runtime/master/ClientRPC.java
index f17f284..213f9a1 100644
--- a/runtime/master/src/main/java/org/apache/nemo/runtime/master/ClientRPC.java
+++ b/runtime/master/src/main/java/org/apache/nemo/runtime/master/ClientRPC.java
@@ -58,11 +58,16 @@ public final class ClientRPC {
   private ClientRPC(final TransportFactory transportFactory,
                     final LocalAddressProvider localAddressProvider,
                     @Parameter(JobConf.ClientSideRPCServerHost.class) final 
String clientHost,
-                    @Parameter(JobConf.ClientSideRPCServerPort.class) final 
int clientPort) throws IOException {
+                    @Parameter(JobConf.ClientSideRPCServerPort.class) final 
int clientPort) {
     transport = 
transportFactory.newInstance(localAddressProvider.getLocalAddress(),
         0, new SyncStage<>(new RPCEventHandler()), null, RETRY_COUNT, 
RETRY_TIMEOUT);
     final SocketAddress clientAddress = new InetSocketAddress(clientHost, 
clientPort);
-    link = transport.open(clientAddress, ENCODER, LINK_LISTENER);
+    try {
+      link = transport.open(clientAddress, ENCODER, LINK_LISTENER);
+    } catch (final IOException e) {
+      throw new IllegalStateException("Failed to setup an RPC connection to 
the Client. "
+        + "A failure at the client-side is suspected.");
+    }
   }
 
   /**

Reply via email to