Merge pull request #1180 from metamx/logging-groupBy-NPE

add null check early to catch root cause for groupBy NPE while running bySegment query
This commit is contained in:
Fangjin Yang 2015-03-09 09:16:33 -07:00
commit 2abdce1dc0
3 changed files with 5 additions and 2 deletions

View File

@ -76,7 +76,7 @@ You can optionally only configure caching to be enabled on the broker by setting
|`druid.broker.cache.useCache`|true, false|Enable the cache on the broker.|false|
|`druid.broker.cache.populateCache`|true, false|Populate the cache on the broker.|false|
|`druid.cache.type`|`local`, `memcached`|The type of cache to use for queries.|`local`|
|`druid.cache.unCacheable`|All druid query types|All query types to not cache.|["groupBy", "select"]|
|`druid.broker.cache.unCacheable`|All druid query types|All query types to not cache.|["groupBy", "select"]|
#### Local Cache

View File

@ -81,7 +81,7 @@ You can optionally only configure caching to be enabled on the historical by set
|`druid.historical.cache.useCache`|true, false|Enable the cache on the historical.|false|
|`druid.historical.cache.populateCache`|true, false|Populate the cache on the historical.|false|
|`druid.cache.type`|`local`, `memcached`|The type of cache to use for queries.|`local`|
|`druid.cache.unCacheable`|All druid query types|All query types to not cache.|["groupBy", "select"]|
|`druid.historical.cache.unCacheable`|All druid query types|All query types to not cache.|["groupBy", "select"]|
#### Local Cache

View File

@ -138,6 +138,9 @@ public class GroupByQueryHelper
@Override
public List accumulate(List accumulated, T in)
{
if(in == null){
throw new ISE("Cannot have null result");
}
accumulated.add(in);
return accumulated;
}