I use MongoInsertStorage with Pig, it's very easy to use and efficient to
export an HDFS file to a MongoDB collection. I specify a custom _id filed,
so when I re-export my HDFS file, if the document already exist it failed.
I don't see how I can specify MongoInsertStorage to make an upsert if the
document already exist, this will be very convenient because I don't want
to drop the collection before re-exporting it (this will empty it and my
service reading the collection will be unavailable during the re-export).
I know that there is a MongoUpdateStorage but it's not as easy to use as
MongoInsertStorage, I have 150 fields in my HDFS files so adding all these
fields in the $set query is not very convenient and each time we will add a
new field in the HDFS file we will need to update the MongoUpdateStorage
You received this message because you are subscribed to the Google Groups "mongodb-user"