Hello,
I'm evaluating Spark/SparkStreaming .
I use SparkStreaming to receive messages from a Kafka topic.
As soon as I have a JavaReceiverInputDStream , I have to treat each message, 
for each one I have to search in MongoDB to find if a document does exist.
If I found the document I have to update it with some values , else I have to 
create a new one.
I success to create a new document by using saveAsNewAPIHadoopFiles , but I 
don't know the best practice to update an existing document from Spark.
In a basic Java program I would use :
   myColl.update(updateQuery, updateCommand);

So, do I have to use this same way to update the document, skip the message and 
let saveAsNewAPIHadoopFiles in order to create the ones to be created ?
Or any other better way ?

Tks
Nicolas 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org

Reply via email to