public class MapReduceOutput
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private DBCollection |
collection |
private DBObject |
command |
private java.util.List<DBObject> |
inlineResults |
private MapReduceStatistics |
mapReduceStatistics |
private DBCursor |
resultsFromCollection |
Constructor and Description |
---|
MapReduceOutput(DBObject command,
DBCursor resultsFromCollection,
MapReduceStatistics mapReduceStatistics,
DBCollection outputCollection)
Constructor for use when the map reduce output was put into a collection
|
MapReduceOutput(DBObject command,
MapReduceBatchCursor<DBObject> results)
Constructor for use with inline map reduce.
|
Modifier and Type | Method and Description |
---|---|
void |
drop()
Drops the collection that holds the results.
|
java.lang.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.
|
java.lang.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
|
java.lang.Iterable<DBObject> |
results()
Returns an iterable containing the results of the operation.
|
java.lang.String |
toString() |
private final DBCollection collection
private final DBObject command
private final java.util.List<DBObject> inlineResults
private final MapReduceStatistics mapReduceStatistics
private final DBCursor resultsFromCollection
MapReduceOutput(DBObject command, MapReduceBatchCursor<DBObject> results)
MapReduceOutput(DBObject command, DBCursor resultsFromCollection, MapReduceStatistics mapReduceStatistics, DBCollection outputCollection)
public java.lang.Iterable<DBObject> results()
public void drop()
public DBCollection getOutputCollection()
public DBObject getCommand()
public java.lang.String toString()
toString
in class java.lang.Object
public final java.lang.String getCollectionName()
public java.lang.String getDatabaseName()
public int getDuration()
public int getInputCount()
public int getOutputCount()
public int getEmitCount()