public class MapReduceOutput extends Object
Constructor and Description |
---|
MapReduceOutput(DBCollection from,
DBObject cmd,
CommandResult raw)
Deprecated.
In the 3.0 version of the driver, this will be constructed only by the driver, and will therefore not have a public
constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
drop()
Drops the collection that holds the results.
|
String |
getCollectionName()
Get the name of the collection that the results of the map reduce were saved into.
|
DBObject |
getCommand()
Get the original command that was sent to the database.
|
CommandResult |
getCommandResult()
Deprecated.
It is not recommended to access the command result returned by the server as the format can change between releases. This
has been replaced with a series of specific getters for the values on the CommandResult (getCollectionName, getDatabaseName,
getDuration, getEmitCount, getOutputCount, getInputCount). The method
results() will continue to return an Iterable<DBObjects> , that should be used to obtain the results of the map-reduce. This method will be removed in 3.0. |
String |
getDatabaseName()
Get the name of the database that the results of the map reduce were saved into.
|
int |
getDuration()
Get the amount of time, in milliseconds, that it took to run this map reduce.
|
int |
getEmitCount()
Get the number of messages emitted from the provided map function.
|
int |
getInputCount()
Get the number of documents that were input into the map reduce operation
|
DBCollection |
getOutputCollection()
Gets the collection that holds the results (Will return null if results are Inline).
|
int |
getOutputCount()
Get the number of documents generated as a result of this map reduce
|
BasicDBObject |
getRaw()
Deprecated.
It is not recommended to access the raw document returned by the server as the format can change between releases. This
has been replaced with a series of specific getters for the values on the result (getCollectionName, getDatabaseName, getDuration,
getEmitCount, getOutputCount, getInputCount). The method
results() will continue to return an Iterable<DBObjects> ,
that should be used to obtain the results of the map-reduce. This method will be removed in 3.0. |
ServerAddress |
getServerUsed()
Get the server that the map reduce command was run on.
|
Iterable<DBObject> |
results()
Returns an iterable containing the results of the operation.
|
String |
toString() |
@Deprecated public MapReduceOutput(DBCollection from, DBObject cmd, CommandResult raw)
from
- the DBCollection the Map Reduce was run againstcmd
- the original Map Reduce command as a DBObjectraw
- the CommandResult containing the raw response from the server.public Iterable<DBObject> results()
public void drop()
MongoException
public DBCollection getOutputCollection()
@Deprecated public BasicDBObject getRaw()
results()
will continue to return an Iterable<DBObjects>
,
that should be used to obtain the results of the map-reduce. This method will be removed in 3.0.@Deprecated public CommandResult getCommandResult()
results()
will continue to return an Iterable<DBObjects>
, that should be used to obtain the results of the map-reduce. This method will be removed in 3.0.public DBObject getCommand()
public ServerAddress getServerUsed()
public final String getCollectionName()
public String getDatabaseName()
public int getDuration()
public int getInputCount()
public int getOutputCount()
public int getEmitCount()