Hi,

I am trying to decode the binary data using UTF-16 decode in Kafka consumer
using spark streaming. But it is giving error:
TypeError: 'str' object is not callable

I am doing it in following way:

kvs = KafkaUtils.createStream(ssc, zkQuorum, "spark-streaming-consumer",
{topic: 1},valueDecoder="utfTo16")

def utfTo16(msg):
  return msg.decode("utf-16")


Please suggest if I am doing it right or not??


Regards,
Yogesh

Reply via email to