开发者

How to delete temporary MapReduce collections in mongoDB

Is there anyway I can delete all the temporary map reduce collections? I read you can pass a parameter boolean, to either keep or delete the collections. ut the parameter is for the shell, and I use the java drivers. Therefore, I cant set the collection to delete upon completion of the query. Is there any shell command to delete all?

db.collections.help()

does not list any command related with that.

Show below is a sample of the collections I have.

tmp.mr.mapreduce_1289483912_开发者_Go百科1
tmp.mr.mapreduce_1289483918_2
tmp.mr.mapreduce_1289483919_3
tmp.mr.mapreduce_1289483974_4
tmp.mr.mapreduce_1289483977_5
tmp.mr.mapreduce_1289484057_6
tmp.mr.mapreduce_1289484058_7
tmp.mr.mapreduce_1289484147_8
tmp.mr.mapreduce_1289484148_9
tmp.mr.mapreduce_1289541146_10
tmp.mr.mapreduce_1289541150_11
tmp.mr.mapreduce_1289542389_12
tmp.mr.mapreduce_1289542390_13
tmp.mr.mapreduce_1289543164_14
tmp.mr.mapreduce_1289543165_15


They should be deleted when the connection to the database is closed. See the answers to this question for details and a way to delete them manually.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜