Return-Path: X-Original-To: apmail-streams-dev-archive@minotaur.apache.org Delivered-To: apmail-streams-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6DDC110EE7 for ; Fri, 14 Nov 2014 06:37:11 +0000 (UTC) Received: (qmail 2262 invoked by uid 500); 14 Nov 2014 06:37:10 -0000 Delivered-To: apmail-streams-dev-archive@streams.apache.org Received: (qmail 2208 invoked by uid 500); 14 Nov 2014 06:37:10 -0000 Mailing-List: contact dev-help@streams.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@streams.incubator.apache.org Delivered-To: mailing list dev@streams.incubator.apache.org Received: (qmail 2196 invoked by uid 99); 14 Nov 2014 06:37:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Nov 2014 06:37:10 +0000 X-ASF-Spam-Status: No, hits=-2000.6 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 14 Nov 2014 06:37:09 +0000 Received: (qmail 98236 invoked by uid 99); 14 Nov 2014 06:35:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Nov 2014 06:35:34 +0000 Date: Fri, 14 Nov 2014 06:35:34 +0000 (UTC) From: "Steve Blackmon (JIRA)" To: dev@streams.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (STREAMS-223) streams-monitoring exception when streamConfig not set MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org Steve Blackmon created STREAMS-223: -------------------------------------- Summary: streams-monitoring exception when streamConfig not set Key: STREAMS-223 URL: https://issues.apache.org/jira/browse/STREAMS-223 Project: Streams Issue Type: Bug Reporter: Steve Blackmon 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(BroadcastMonitorThread.java:144) [classes/:na] at org.apache.streams.monitoring.tasks.BroadcastMonitorThread.(BroadcastMonitorThread.java:58) [classes/:na] at org.apache.streams.local.builders.LocalStreamBuilder.(LocalStreamBuilder.java:114) [classes/:na] at org.apache.streams.local.builders.LocalStreamBuilder.(LocalStreamBuilder.java:89) [classes/:na] at org.apache.streams.twitter.example.TwitterUserstreamConsole.main(TwitterUserstreamConsole.java:49) [classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_20] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_20] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_20] at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_20] at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) [idea_rt.jar:na] 00:31:21.773 [main] DEBUG o.a.s.l.builders.LocalStreamBuilder - Attaching shutdown handler The workaround is to supply a config like this: Map 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 (v6.3.4#6332)