Package com.mongodb

Class MapReduceOutput

java.lang.Object
com.mongodb.MapReduceOutput

@Deprecated public class MapReduceOutput extends Object
Deprecated.
Superseded by aggregate
Represents the result of a map/reduce operation. Users should interact with the results of the map reduce via the results() method, or by interacting directly with the collection the results were input into.
MongoDB documentation
Map-Reduce
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated.
    Drops the collection that holds the results.
    final String
    Deprecated.
    Get the name of the collection that the results of the map reduce were saved into.
    Deprecated.
    Get the original command that was sent to the database.
    Deprecated.
    Get the name of the database that the results of the map reduce were saved into.
    int
    Deprecated.
    Get the amount of time, in milliseconds, that it took to run this map reduce.
    int
    Deprecated.
    Get the number of messages emitted from the provided map function.
    int
    Deprecated.
    Get the number of documents that were input into the map reduce operation
    Deprecated.
    Gets the collection that holds the results (Will return null if results are Inline).
    int
    Deprecated.
    Get the number of documents generated as a result of this map reduce
    Deprecated.
    Returns an iterable containing the results of the operation.
    Deprecated.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Method Details

    • results

      public Iterable<DBObject> results()
      Deprecated.
      Returns an iterable containing the results of the operation.
      Returns:
      the results in iterable form
    • drop

      public void drop()
      Deprecated.
      Drops the collection that holds the results. Does nothing if the map-reduce returned the results inline.
    • getOutputCollection

      @Nullable public DBCollection getOutputCollection()
      Deprecated.
      Gets the collection that holds the results (Will return null if results are Inline).
      Returns:
      the collection or null
    • getCommand

      public DBObject getCommand()
      Deprecated.
      Get the original command that was sent to the database.
      Returns:
      a DBObject containing the values of the original map-reduce command.
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class Object
    • getCollectionName

      @Nullable public final String getCollectionName()
      Deprecated.
      Get the name of the collection that the results of the map reduce were saved into. If the map reduce was an inline operation (i.e . the results were returned directly from calling the map reduce) this will return null.
      Returns:
      the name of the collection that the map reduce results are stored in
    • getDatabaseName

      public String getDatabaseName()
      Deprecated.
      Get the name of the database that the results of the map reduce were saved into. If the map reduce was an inline operation (i.e . the results were returned directly from calling the map reduce) this will return null.
      Returns:
      the name of the database that holds the collection that the map reduce results are stored in
    • getDuration

      public int getDuration()
      Deprecated.
      Get the amount of time, in milliseconds, that it took to run this map reduce.
      Returns:
      an int representing the number of milliseconds it took to run the map reduce operation
    • getInputCount

      public int getInputCount()
      Deprecated.
      Get the number of documents that were input into the map reduce operation
      Returns:
      the number of documents that read while processing this map reduce
    • getOutputCount

      public int getOutputCount()
      Deprecated.
      Get the number of documents generated as a result of this map reduce
      Returns:
      the number of documents output by the map reduce
    • getEmitCount

      public int getEmitCount()
      Deprecated.
      Get the number of messages emitted from the provided map function.
      Returns:
      the number of items emitted from the map function