MongoDB  2.7.0
Public Member Functions | List of all members
mongo::ParallelSortClusteredCursor Class Reference

Runs a query in parallel across N servers, enforcing compatible chunk versions for queries across all shards. More...

#include <parallel.h>

Public Member Functions

 ParallelSortClusteredCursor (const QuerySpec &qSpec, const CommandInfo &cInfo=CommandInfo())
 
 ParallelSortClusteredCursor (const set< ServerAndQuery > &servers, const string &ns, const Query &q, int options=0, const BSONObj &fields=BSONObj())
 
std::string getNS ()
 
void init ()
 call before using
 
bool more ()
 
BSONObj next ()
 
string type () const
 
void fullInit ()
 
void startInit ()
 
void finishInit ()
 
bool isCommand ()
 
bool isExplain ()
 
bool isVersioned ()
 
bool isSharded ()
 
ShardPtr getPrimary ()
 
void getQueryShards (set< Shard > &shards)
 
ChunkManagerPtr getChunkManager (const Shard &shard)
 
DBClientCursorPtr getShardCursor (const Shard &shard)
 
BSONObj toBSON () const
 
string toString () const
 
void explain (BSONObjBuilder &b)
 

Detailed Description

Runs a query in parallel across N servers, enforcing compatible chunk versions for queries across all shards.

If CommandInfo is provided, the ParallelCursor does not use the direct .$cmd namespace in the query spec, but instead enforces versions across another namespace specified by CommandInfo. This is to support commands like: db.runCommand({ fileMD5 : "<coll name>" })

There is a deprecated legacy mode as well which effectively does a merge-sort across a number of servers, but does not correctly enforce versioning (used only in mapreduce).


The documentation for this class was generated from the following files: