GitHub user dashengju opened a pull request:

    https://github.com/apache/incubator-storm/pull/217

    [STORM-443] fix the problem of log level implementation to compatible with 
old log p...

    Storm now support logging level to multilang protocol spout and bolt. But 
the implementation is not compatible with old log protocol with no logging 
level.
    
    With old topology who use old protocol, when they send log with no 
loglevel, JsonSerializer's readShellMsg function will throw NPE at:
    
     if (command.equals("log"))
     { 
         long logLevel = (Long)msg.get("level"); //throw NPE at here 
         shellMsg.setLogLevel((int)logLevel); 
     }
    
    ShellBolt will catch the NPE, and call die(), and die() will get error info 
from sub process's error stream in _process.getProcessTerminationInfoString(), 
but the error stream have no data come, it will hangs.
    
     private void die(Throwable exception)
     { 
         String processInfo = _process.getProcessInfoString() + 
_process.getProcessTerminationInfoString(); 
         _exception = new RuntimeException(processInfo, exception); 
      }
    
    This PR will fix the problem of log level implementation to compatible with 
old log protocol. And the die problem should be solved by Kang Xiao 's PR 
https://github.com/apache/incubator-storm/pull/46

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dashengju/incubator-storm 
Multilang_JsonSerializer

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-storm/pull/217.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #217
    
----
commit 837b9e50acbfb3b91009ed08259c44e0efebcebf
Author: JuDasheng <[email protected]>
Date:   2014-08-07T08:39:59Z

    fix the problem of log level implementation to compatible with old log 
protocol with no loglevel

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to