[ 
https://issues.apache.org/jira/browse/KAFKA-1180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13855181#comment-13855181
 ] 

Joe Stein commented on KAFKA-1180:
----------------------------------

Hi Jason, this patch was developed for you to try out against 0.8 branch, yes.

I would +1 on a 0.8.0.1 release with this fix (and anything else spring up) as 
it would also resolve the 2.8.0 zero length maven issue too (as that is just 
build related so two JIRA tickets).  I understand if folks didn't want to 
switch scala versions in production also along with making other changes in 
case something went wrong and what was the cause.   2.8.0 should be supported 
in maven but I still think (need to throw a documentation patch up for this) we 
should document sbt and maven using scala 2.10 (conflating JIRAs some here, 
sorry).

I haven't tried the patch yet on 0.8.1 as I wanted to 100% make sure first this 
resolved your issue and that you didn't hit another issue after this was fixed.

0.8.1 might not be too far away also and with release time and testing maybe 
0.8.1 comes out within the same time frame the community would be looking for 
0.8.0.1.  I haven't tried the Log Compaction stuff in 0.8.1 yet but it looks 
really awesome https://cwiki.apache.org/confluence/display/KAFKA/Log+Compaction 
will do that when I try this patch on 0.8.1 once you confirm it works for you 
as expected.

> WhiteList topic filter gets a NullPointerException on complex Regex
> -------------------------------------------------------------------
>
>                 Key: KAFKA-1180
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1180
>             Project: Kafka
>          Issue Type: Bug
>          Components: consumer
>    Affects Versions: 0.8.0
>            Reporter: Jason Rosenberg
>            Assignee: Neha Narkhede
>         Attachments: KAFKA-1180.patch, KAFKA-1180_2013-12-22_01:24:57.patch
>
>
> We are needing to create a stream selector that essentially combines the 
> logic of the BlackList and WhiteList classes (which is not easily exposed in 
> the high-level consumer api).  That is, we want to select a topic that 
> contains a certain prefix, as long as it doesn't also contain a secondary 
> string.
> This should be easy to do with ordinary java Regex's, but we're running into 
> some issues, trying to do this with the WhiteList class only.
> We have a pattern that uses negative lookahead, like this:
> "test-(?!bad\\b)[\\w]+"
> So this should select a topic like: "test-good", but exclude a topic like 
> "test-bad", and also exclude a topic without the "test" prefix, like 
> "foo-bar".
> Instead, what we see is a NullPointerException in the call to 
> createMessageStreamsByFilter (after having previously sent a message to 
> "test-good" followed by a message to "test-bad"):
> 21700 
> [ConsumerFetcherThread-group1_square-1a7ac0.local-1386869343370-dc19c7dc-0-1946108683]
>  ERROR kafka.consumer.ConsumerFetcherThread  - 
> [ConsumerFetcherThread-group1_square-1a7ac0.local-1386869343370-dc19c7dc-0-1946108683],
>  Error due to 
> kafka.common.KafkaException: error processing data for partition [test-bad,0] 
> offset 0
>       at 
> kafka.server.AbstractFetcherThread$$anonfun$processFetchRequest$1$$anonfun$apply$mcV$sp$2.apply(AbstractFetcherThread.scala:137)
>       at 
> kafka.server.AbstractFetcherThread$$anonfun$processFetchRequest$1$$anonfun$apply$mcV$sp$2.apply(AbstractFetcherThread.scala:109)
>       at scala.collection.immutable.Map$Map1.foreach(Map.scala:105)
>       at 
> kafka.server.AbstractFetcherThread$$anonfun$processFetchRequest$1.apply$mcV$sp(AbstractFetcherThread.scala:109)
>       at 
> kafka.server.AbstractFetcherThread$$anonfun$processFetchRequest$1.apply(AbstractFetcherThread.scala:109)
>       at 
> kafka.server.AbstractFetcherThread$$anonfun$processFetchRequest$1.apply(AbstractFetcherThread.scala:109)
>       at kafka.utils.Utils$.inLock(Utils.scala:565)
>       at 
> kafka.server.AbstractFetcherThread.processFetchRequest(AbstractFetcherThread.scala:108)
>       at 
> kafka.server.AbstractFetcherThread.doWork(AbstractFetcherThread.scala:86)
>       at kafka.utils.ShutdownableThread.run(ShutdownableThread.scala:51)
> Caused by: java.lang.NullPointerException
>       at 
> kafka.consumer.PartitionTopicInfo.enqueue(PartitionTopicInfo.scala:60)
>       at 
> kafka.consumer.ConsumerFetcherThread.processPartitionData(ConsumerFetcherThread.scala:49)
>       at 
> kafka.server.AbstractFetcherThread$$anonfun$processFetchRequest$1$$anonfun$apply$mcV$sp$2.apply(AbstractFetcherThread.scala:128)
>       ... 9 more



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to