Have you tried passing in a Map that happens to have
string for all the values? I haven't tested this, but the underlying
kafka consumer constructor is documented to take either strings or
objects as values, despite the static type.
On Wed, Jan 24, 2018 at 2:48 PM, Tecno Brain
Basically, I am trying to avoid writing code like:
switch( key ) {
case "key.deserializer" : result.put(key ,
Class.forName(value)); break;
case "key.serializer" : result.put(key ,
Class.forName(value)); break;
case "value.deserializer" :
On page
https://spark.apache.org/docs/latest/streaming-kafka-0-10-integration.html
there is this Java example:
Map kafkaParams = new
HashMap<>();kafkaParams.put("bootstrap.servers",
"localhost:9092,anotherhost:9092");kafkaParams.put("key.deserializer",