You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nemo.apache.org by sa...@apache.org on 2018/06/15 07:41:33 UTC

[incubator-nemo] branch master updated: [NEMO-112] Handle InterruptedException properly (#39)

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

sanha 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 e224c5d  [NEMO-112] Handle InterruptedException properly (#39)
e224c5d is described below

commit e224c5d2421b87f236ad8f42998e9a6a0cc7015f
Author: Eunji Jeong <eg...@gmail.com>
AuthorDate: Fri Jun 15 16:41:24 2018 +0900

    [NEMO-112] Handle InterruptedException properly (#39)
    
    JIRA: [NEMO-112: SonarCloud Bugs and Vulnerabilities for Nemo Runtime Common](https://issues.apache.org/jira/projects/NEMO/issues/NEMO-112)
    
    **Major changes:**
    - Handled `InterruptedException` properly
    
    resolves [NEMO-112](https://issues.apache.org/jira/projects/NEMO/issues/NEMO-112)
---
 .../nemo/runtime/common/message/PersistentConnectionToMasterMap.java    | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/runtime/common/src/main/java/edu/snu/nemo/runtime/common/message/PersistentConnectionToMasterMap.java b/runtime/common/src/main/java/edu/snu/nemo/runtime/common/message/PersistentConnectionToMasterMap.java
index c56fec6..8a2b8bc 100644
--- a/runtime/common/src/main/java/edu/snu/nemo/runtime/common/message/PersistentConnectionToMasterMap.java
+++ b/runtime/common/src/main/java/edu/snu/nemo/runtime/common/message/PersistentConnectionToMasterMap.java
@@ -43,6 +43,7 @@ public final class PersistentConnectionToMasterMap {
           messageEnvironment.<ControlMessage.Message>asyncConnect(MessageEnvironment.MASTER_COMMUNICATION_ID,
               MessageEnvironment.BLOCK_MANAGER_MASTER_MESSAGE_LISTENER_ID).get());
     } catch (InterruptedException | ExecutionException e) {
+      Thread.currentThread().interrupt();
       throw new NodeConnectionException(e);
     }
   }
@@ -64,6 +65,7 @@ public final class PersistentConnectionToMasterMap {
             MessageEnvironment.MASTER_COMMUNICATION_ID, listenerId).get();
         messageSenders.put(listenerId, createdMessageSender);
       } catch (InterruptedException | ExecutionException e) {
+        Thread.currentThread().interrupt();
         throw new NodeConnectionException(e);
       }
       return createdMessageSender;

-- 
To stop receiving notification emails like this one, please contact
sanha@apache.org.