Github user revans2 commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2365#discussion_r143807488
  
    --- Diff: storm-client/src/jvm/org/apache/storm/drpc/DRPCSpout.java ---
    @@ -105,13 +105,19 @@ public Adder(String server, int port, Map<String, 
Object> conf) {
     
             @Override
             public Void call() throws Exception {
    -            DRPCInvocationsClient c = new DRPCInvocationsClient(conf, 
server, port);
    -            synchronized (_clients) {
    -                _clients.add(c);
    +            try{
    +                DRPCInvocationsClient c = new DRPCInvocationsClient(conf, 
server, port);
    +                synchronized (_clients) {
    +                    _clients.add(c);
    +                }
    +            }catch (Exception e){
    +                LOG.warn("Can't connect to some drpcserver when init 
drpcspout,please check your cluster.");
    +            }finally {
    +                return null;
    --- End diff --
    
    I'm not really sure about having a return in a finally block.  Will it not 
eat every exception that is ever thrown?  I'm not sure that we want that.


---

Reply via email to