测试Spark Streaming的DirectStream时需要设置泛型,import kafka.serializer.StringDecoder导入后报错,哪位碰到过类似的问题?
object serializer is not a member of package org.apache.spark.streaming.kafka
val lines =KafkaUtils.createDirectStream[String, String, StringDecoder, StringDecoder](ssc, kafkaParams, topicsSet).map(_._2)
Scala-XML has been factored out into a separate library as of Scala 2.11, so it is not included in Scala projects by default. To include it in your project via sbt add this dependency: