public class MapReduce extends Object
MongoCollection.mapReduce(com.allanbank.mongodb.builder.MapReduce)
command.
Objects of this class are created using the nested MapReduce.Builder
.Modifier and Type | Class and Description |
---|---|
static class |
MapReduce.Builder
Helper for creating immutable
MapReduce commands. |
static class |
MapReduce.OutputType
Enumeration of the possible output types.
|
Modifier | Constructor and Description |
---|---|
protected |
MapReduce(MapReduce.Builder builder)
Create a new MapReduce.
|
Modifier and Type | Method and Description |
---|---|
String |
getFinalizeFunction()
Returns the finalize function to apply to the final results of the reduce
function.
|
int |
getLimit()
Returns the limit for the number of objects to be used as input to the
map/reduce.
|
String |
getMapFunction()
Returns the map functions to apply to each selected document.
|
String |
getOutputDatabase()
Returns the name of the output database if the output type is One of
MapReduce.OutputType.REPLACE , MapReduce.OutputType.MERGE , or
MapReduce.OutputType.REDUCE . |
String |
getOutputName()
Returns the name of the output collection if the output type is One of
MapReduce.OutputType.REPLACE , MapReduce.OutputType.MERGE , or
MapReduce.OutputType.REDUCE . |
MapReduce.OutputType |
getOutputType()
Returns the handling for the output of the map/reduce.
|
Document |
getQuery()
Returns the query to select the documents to run the map/reduce against.
|
String |
getReduceFunction()
Returns the reduce function to apply to the emitted output of the map
function.
|
Document |
getScope()
Returns the scoped values to expose to the map/reduce/finalize functions.
|
Document |
getSort()
Returns the sort to apply to the input objects.
|
boolean |
isJsMode()
Returns true to limit the translation of the documents to an from
BSON/JavaScript.
|
boolean |
isKeepTemp()
Returns true to drop the temporary collections created during the
map/reduce.
|
boolean |
isVerbose()
Returns true to emit progress messages in the server logs.
|
protected MapReduce(MapReduce.Builder builder)
builder
- The builder to copy state from.public String getFinalizeFunction()
public int getLimit()
public String getMapFunction()
public String getOutputDatabase()
MapReduce.OutputType.REPLACE
, MapReduce.OutputType.MERGE
, or
MapReduce.OutputType.REDUCE
.MapReduce.OutputType.REPLACE
, MapReduce.OutputType.MERGE
, or
MapReduce.OutputType.REDUCE
.public String getOutputName()
MapReduce.OutputType.REPLACE
, MapReduce.OutputType.MERGE
, or
MapReduce.OutputType.REDUCE
.MapReduce.OutputType.REPLACE
, MapReduce.OutputType.MERGE
, or
MapReduce.OutputType.REDUCE
.public MapReduce.OutputType getOutputType()
public Document getQuery()
public String getReduceFunction()
public Document getScope()
public Document getSort()
public boolean isJsMode()
public boolean isKeepTemp()
public boolean isVerbose()
Copyright © 2011-2012 Allanbank Consulting, Inc.. All Rights Reserved.