Github user shyamsalimkumar commented on the pull request:

    https://github.com/apache/spark/pull/8133#issuecomment-131740417
  
    I get the same NPE issue in `Spark 1.4.1` also. I'm not sure what's wrong 
(yet) as my spark streaming job was running fine printing out `Array[Byte]` 
data, but after I added a custom decoder (Avro to my class `Swipe`) it keeps 
spitting the NPE error (`consumer` is `null`). Any hints on what could be the 
root 
cause?
    
    `val swipes = KafkaUtils.createDirectStream[Array[Byte], Array[Byte], 
DefaultDecoder, DefaultDecoder](ssc, kafkaParams, topics)` works, but 
    `val swipes = KafkaUtils.createDirectStream[Array[Byte], Swipe, 
DefaultDecoder, SwipeDecoder](ssc, kafkaParams, topics)` doesn't. In that 
aspect the NPE is sorta misleading (maybe). 


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to