Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to delete documents(records) with Mongo-Hadoop connector for Spark

I am using Mongo-Hadoop connector to work with Spark and MongoDB.I want to delete the documents in an RDD from the MongoDB,looks there is a MongoUpdateWritable to support document update. Is there way to do deletion with Mongo-Hadoop connector?

Thanks

like image 427
Tom Avatar asked Jan 01 '26 14:01

Tom


1 Answers

If you want only delete records in an RDD use the functions of the Spark API, like map, reduce, filter...

If you want save later the results, use the MongoUpdateWriteble.

Look the basics: Mongo-Hadoop-Spark

like image 70
Cristu Naranjo Avatar answered Jan 04 '26 17:01

Cristu Naranjo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!