mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
14 lines
458 B
JavaScript
14 lines
458 B
JavaScript
var st = new ShardingTest({ shards: 1 });
|
|
|
|
var testDB = st.s.getDB('test');
|
|
|
|
var mapFunc = function() { emit(this.x, 1); };
|
|
var reduceFunc = function(key, values) { return values.length; };
|
|
|
|
assert.commandFailed(testDB.runCommand({ mapReduce: 'user',
|
|
map: mapFunc,
|
|
reduce: reduceFunc,
|
|
out: { inline: 1, sharded: true }}));
|
|
|
|
st.stop();
|