|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.basho.riak.client.query.MapReduce
public abstract class MapReduce
An operation for defining and runnig a Map/Reduce query on Riak.
See Map/Reduce for details.
IRiakClient.mapReduce()
,
IRiakClient.mapReduce(String)
Constructor Summary | |
---|---|
MapReduce(RawClient client)
Create the MapRedcue operation with the RawClient to delegate to. |
Method Summary | |
---|---|
MapReduce |
addLinkPhase(String bucket,
String tag)
Create a Link Phase that points to bucket / tag
keep will be false |
MapReduce |
addLinkPhase(String bucket,
String tag,
boolean keep)
Add a Link Phase that points to bucket / tag
. |
MapReduce |
addMapPhase(Function phaseFunction)
Add a MapPhase |
MapReduce |
addMapPhase(Function phaseFunction,
boolean keep)
Add MapPhase to the query |
MapReduce |
addMapPhase(Function phaseFunction,
Object arg)
Add a MapPhase |
MapReduce |
addMapPhase(Function phaseFunction,
Object arg,
boolean keep)
Add a MapPhase |
MapReduce |
addReducePhase(Function phaseFunction)
Add a ReducePhase |
MapReduce |
addReducePhase(Function phaseFunction,
boolean keep)
Add ReducePhase to the query |
MapReduce |
addReducePhase(Function phaseFunction,
Object arg)
Add a ReducePhase |
MapReduce |
addReducePhase(Function phaseFunction,
Object arg,
boolean keep)
Add a ReducePhase |
MapReduceResult |
execute()
Run the Map/Reduce job against the RawClient the operation was
constructed with. |
MapReduce |
timeout(long timeout)
Set the operations timeout |
protected void |
validate()
Check that this map/reduce job is valid |
protected abstract void |
writeInput(org.codehaus.jackson.JsonGenerator jsonGenerator)
Override to write the input specification of the M/R job. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MapReduce(RawClient client)
RawClient
to delegate to.
client
- a RawClient
IRiakClient.mapReduce()
,
IRiakClient.mapReduce(String)
Method Detail |
---|
public MapReduceResult execute() throws RiakException
RawClient
the operation was
constructed with.
execute
in interface RiakOperation<MapReduceResult>
MapReduceResult
containing the results of the query.
RiakException
InvalidMapReduceException
protected void validate()
InvalidMapReduceException
public MapReduce timeout(long timeout)
timeout
-
public MapReduce addMapPhase(Function phaseFunction, boolean keep)
MapPhase
to the query
phaseFunction
- the Function
keep
- keep the results and return them with the query results?
public MapReduce addMapPhase(Function phaseFunction, Object arg, boolean keep)
phaseFunction
- the Function
arg
- an argument that will be passed to the phase verbatim
(Object#toString)keep
- if the result should be returned or merely provide input for
the next phase.
public MapReduce addMapPhase(Function phaseFunction, Object arg)
phaseFunction
- the Function
arg
- an argument that will be passed to the phase verbatim
(Object#toString)
public MapReduce addMapPhase(Function phaseFunction)
phaseFunction
- the Function
public MapReduce addReducePhase(Function phaseFunction, boolean keep)
ReducePhase
to the query
phaseFunction
- the Function
keep
- keep the results and return them with the query results?
public MapReduce addReducePhase(Function phaseFunction, Object arg, boolean keep)
ReducePhase
phaseFunction
- the Function
arg
- an argument that will be passed to the phase verbatim
(Object#toString)keep
- if the result should be returned or merely provide input for
the next phase.
public MapReduce addReducePhase(Function phaseFunction, Object arg)
ReducePhase
phaseFunction
- the Function
arg
- an argument that will be passed to the phase verbatim
public MapReduce addReducePhase(Function phaseFunction)
ReducePhase
phaseFunction
-
public MapReduce addLinkPhase(String bucket, String tag, boolean keep)
bucket
/ tag
.
bucket
- the bucket at the end of the link (or "_" or "" for wildcard)tag
- the tag (or ("_", or "" for wildcard)keep
- to keep the result of this phase and return it at the end of
the operationpublic MapReduce addLinkPhase(String bucket, String tag)
bucket
/ tag
keep
will be false
bucket
- the bucket at the end of the link (or "_" or "" for wildcard)tag
- the tag (or ("_", or "" for wildcard)protected abstract void writeInput(org.codehaus.jackson.JsonGenerator jsonGenerator) throws IOException
jsonGenerator
- a Jackson JsonGenerator
to write the input spec to
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |