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

zjffdu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git


The following commit(s) were added to refs/heads/master by this push:
     new 476f0e5  [ZEPPELIN-4712]remove paragraph failed due to Interpreter 
connection refused
476f0e5 is described below

commit 476f0e5d1c441bf18e7ed4d129bf4de700d1b5ba
Author: xiejiajun <xiejiaju...@163.com>
AuthorDate: Wed Apr 1 01:44:15 2020 +0800

    [ZEPPELIN-4712]remove paragraph failed due to Interpreter connection refused
    
    ### What is this PR for?
    - an interpreter process refused to connect due to it abnormal stop , which 
eventually caused the remove paragraph operation to fail to complete when i try 
remove a paragraph.
    
    ### What type of PR is it?
    - Bug Fix
    
    ### What is the Jira issue?
    * https://issues.apache.org/jira/browse/ZEPPELIN-4712
    
    ### Questions:
    Does the licenses files need update? NO
    Is there breaking changes for older versions? NO
    Does this needs documentation? NO
    
    Author: xiejiajun <xiejiaju...@163.com>
    Author: xie-jia-jun <xiejiaju...@163.com>
    
    Closes #3710 from xiejiajun/branch-0.9 and squashes the following commits:
    
    9bb7341ff [xiejiajun] Merge remote-tracking branch 'origin/branch-0.9' into 
branch-0.9
    9bc56056b [xiejiajun] bug fix:  when we removing a paragraph , an 
interpreter process refused to connect due to it abnormal stop , which 
eventually caused the remove paragraph operation to fail to complete.
    97d271487 [xie-jia-jun] Merge pull request #2 from apache/branch-0.9
    9b3c744a0 [xiejiajun] added timeout for getting Thrift client to avoid 
situations where the interpreter may not be restarted when the interpreter 
process exits unexpectedly
    
    (cherry picked from commit 3fdd8bb66ac7d04c16e08ca7b53e9820322374eb)
    Signed-off-by: Jeff Zhang <zjf...@apache.org>
---
 .../interpreter/InterpreterSettingManager.java     | 31 ++++++++++++----------
 1 file changed, 17 insertions(+), 14 deletions(-)

diff --git 
a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSettingManager.java
 
b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSettingManager.java
index 85ab17e..899c850 100644
--- 
a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSettingManager.java
+++ 
b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSettingManager.java
@@ -676,20 +676,23 @@ public class InterpreterSettingManager implements 
NoteEventListener, ClusterEven
         if (paragraphId != null) {
           resourceSet = resourceSet.filterByParagraphId(paragraphId);
         }
-
-        for (final Resource r : resourceSet) {
-          remoteInterpreterProcess.callRemoteFunction(
-              new RemoteInterpreterProcess.RemoteFunction<Void>() {
-
-                @Override
-                public Void call(RemoteInterpreterService.Client client) 
throws Exception {
-                  client.resourceRemove(
-                      r.getResourceId().getNoteId(),
-                      r.getResourceId().getParagraphId(),
-                      r.getResourceId().getName());
-                  return null;
-                }
-              });
+        try{
+          for (final Resource r : resourceSet) {
+            remoteInterpreterProcess.callRemoteFunction(
+                    new RemoteInterpreterProcess.RemoteFunction<Void>() {
+
+                      @Override
+                      public Void call(RemoteInterpreterService.Client client) 
throws Exception {
+                        client.resourceRemove(
+                                r.getResourceId().getNoteId(),
+                                r.getResourceId().getParagraphId(),
+                                r.getResourceId().getName());
+                        return null;
+                      }
+                    });
+          }
+        }catch (Exception e){
+          LOGGER.error(e.getMessage());
         }
       }
     }

Reply via email to