I'm fairly new to stream programming. We have Kafka stream which use Avro.

I want to connect a Kafka Stream to Spark Stream. I used bellow code.

```
kvs = KafkaUtils.createDirectStream(ssc, [topic], {"metadata.broker.list": brokers})
lines = kvs.map(lambda x: x[1]) 

```

I got bellow error.

> 
> return s.decode('utf-8')
>  File "/usr/lib64/python2.7/encodings/utf\_8.py", line 16, in decode
>  return codecs.utf\_8\_decode(input, errors, True)
>  UnicodeDecodeError: 'utf8' codec can't decode bytes in position 57-58: invalid continuation byte
> 
> 
> 

Do i need to specify that Kafka use Avro, Is above error for that? If it is how I can specify it?