1024programmer Java MongodbMapreduce output option is replace to a Collection but there is no such result Collection TAT

MongodbMapreduce output option is replace to a Collection but there is no such result Collection TAT

Mapreduce

When I was doing MR, I wanted to write the results into a new collection. In fact, I have done it before, but when I In my mind, I always seem to be unable to write in, so bad!

1
2
3
4
5
6
7
8
9
10
11
12
13
// …. More code

Try {
br />
                 this.dbc, MapString,

                ReduceString,

                dbtemp,

                   MapReduceCommand.OutputType.REPLACE,

query);

                      cmd.setFinalize(Finalize);

//…more code

The formal parameters of MapReduceCommand are as follows

1 public MapReduceCommand(com.mongodb.DBCollection inputCollection, java.lang.String map, java.lang.String reduce, java.lang.String outputCollection, com.mongodb.MapReduceCommand.OutputType type, com.mongodb .DBObject query) { /* compiled code */ }

I hope there are friends who have done mongo to discuss together

This article is from the internet and does not represent1024programmerPosition, please indicate the source when reprinting:https://www.1024programmer.com/mongodbmapreduce-output-option-is-replace-to-a-collection-but-there-is-no-such-result-collection-tat/

author: admin

Previous article
Next article

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: 34331943@QQ.com

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索