streams-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (STREAMS-223) streams-monitoring exception when streamConfig not set
Date Mon, 17 Nov 2014 19:12:37 GMT


ASF GitHub Bot commented on STREAMS-223:

GitHub user robdouglas opened a pull request:

    STREAMS-223 | Fixing faulty if statement logic that was causing NPEs whe...

    ...n stream config objects were not explicitly set

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

    $ git pull STREAMS-223

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

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

    This closes #132
commit 2f11ad004cb199096457f1c29710498fab426566
Author: Robert Douglas <>
Date:   2014-11-17T19:12:12Z

    STREAMS-223 | Fixing faulty if statement logic that was causing NPEs when stream config
objects were not explicitly set


> streams-monitoring exception when streamConfig not set
> ------------------------------------------------------
>                 Key: STREAMS-223
>                 URL:
>             Project: Streams
>          Issue Type: Bug
>            Reporter: Steve Blackmon
>            Priority: Minor
> LocalStreamBuilder supports a default execution even when streamConfig is empty/null
> StreamBuilder builder = new LocalStreamBuilder(100);
> streams-monitoring throws an exception and does not run when no config is supplied.
> 00:31:21.762 [main] ERROR o.a.s.m.tasks.BroadcastMonitorThread - Exception while trying
to set default broadcast thread wait time: {}
> java.lang.NullPointerException: null
> 	at org.apache.streams.monitoring.tasks.BroadcastMonitorThread.setWaitTime(
> 	at org.apache.streams.monitoring.tasks.BroadcastMonitorThread.<init>(
> 	at<init>(
> 	at<init>(
> 	at org.apache.streams.twitter.example.TwitterUserstreamConsole.main(
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_20]
> 	at sun.reflect.NativeMethodAccessorImpl.invoke( ~[na:1.8.0_20]
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> 	at java.lang.reflect.Method.invoke( ~[na:1.8.0_20]
> 	at com.intellij.rt.execution.application.AppMain.main( [idea_rt.jar:na]
> 00:31:21.773 [main] DEBUG - Attaching shutdown handler
> The workaround is to supply a config like this:
>         Map<String, Object> streamConfig = Maps.newHashMap();
>         streamConfig.put(LocalStreamBuilder.TIMEOUT_KEY, 20 * 60 * 1000);
>         streamConfig.put("monitoring_broadcast_interval_ms", -1);
>         StreamBuilder builder = new LocalStreamBuilder(100, streamConfig);
> But that should not be necessary.  
> Establish documented defaults for this capability, ensure no exceptions occur in the
default state, and do not require explicit action by the implementation to use the default.

This message was sent by Atlassian JIRA

View raw message