我正在尝试使用yarn-client模式运行以下代码,但是下面提到的读取处理器错误很慢,但代码在本地模式下运行正常。任何指针都非常感激。
从Kafka Queue接收数据的代码行:
using System.Net;
using System.IO;
String[] URLList = File.ReadAllLines(C:\yourURLFile.txt");
foreach (String URL in URLList) {
using (WebClient webClient = new WebClient()) {
webClient.DownloadFileAsync(new Uri(URL), @"C:\PicFolder\");
}
}
错误详情:
JavaPairReceiverInputDStream<String, String> messages = KafkaUtils.createStream(jssc, String.class, String.class, StringDecoder.class, StringDecoder.class, kafkaParams, kafkaTopicMap, StorageLevel.MEMORY_ONLY());
JavaDStream<String> lines = messages.map(new Function<Tuple2<String, String>, String>() {
public String call(Tuple2<String, String> tuple2) {
LOG.info(" &&&&&&&&&&&&&&&&&&&& Input json stream data " + tuple2._2);
return tuple2._2();
}
});