In my custom receiver for Spark Streaming I've code such as this:
messages.toArray().foreach(msg => {
val m = msg.asInstanceOf[Message]
* store(m.getBody)*
})
Instead of 'body' which is of type 'String', I would rather pass the entire
Message object, but when I say store(m), I get a compiler error saying:
"Cannot resolve reference store with such signature"
But I see this method in 'Receiver.scala':
def store(dataItem: T) {
executor.pushSingle(dataItem)
}
How do I store the entire object? Please help. Thanks.