Can Apache Spark merge several similar lines into one line?
问题 I am totaly new with Apache Spark, therefore, I am very sorry if my question seems to be naive but I did not find a clear answer on internet. Here is the context of my problem: I want to retrieve json input data from an Apache Kafka server. The format is as follows: {"deviceName":"device1", "counter":125} {"deviceName":"device1", "counter":125} {"deviceName":"device2", "counter":88} {"deviceName":"device1", "counter":125} {"deviceName":"device2", "counter":88} {"deviceName":"device1",