|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.basho.riak.client.request.MapReduceBuilder
WARNING: This class will be REMOVED in the next version.
@Deprecated public class MapReduceBuilder
Builds a map/reduce job description and submits it Uses the same chained method metaphor as StringBuilder or StringBuffer
MapReduceBuilder| Constructor Summary | |
|---|---|
MapReduceBuilder()
Deprecated. |
|
MapReduceBuilder(RiakClient riak)
Deprecated. |
|
| Method Summary | |
|---|---|
void |
addRiakObject(String bucket,
String key)
Deprecated. Adds a Riak object (bucket name/key pair) to the map/reduce job as inputs |
void |
clearRiakObjects()
Deprecated. Remove all Riak objects from the input list |
String |
getBucket()
Deprecated. Gets the name of the Riak bucket the map/reduce job will process |
RiakClient |
getRiakClient()
Deprecated. The RiakClient to which this map reduce job will be submitted to
when submit() is called. |
Map<String,Set<String>> |
getRiakObjects()
Deprecated. Returns a copy of the Riak objects on the input list for a map/reduce job |
int |
getTimeout()
Deprecated. Gets the currently assigned timeout |
MapReduceBuilder |
keyFilter(MapReduceFilter... filters)
Deprecated. Adds a map phase to the job |
MapReduceBuilder |
link(String bucket,
boolean keep)
Deprecated. Adds a link phase to the job |
MapReduceBuilder |
link(String bucket,
String tag,
boolean keep)
Deprecated. Adds a link phase to the job |
MapReduceBuilder |
map(MapReduceFunction function,
boolean keep)
Deprecated. Adds a map phase to the job |
MapReduceBuilder |
map(MapReduceFunction function,
Object arg,
boolean keep)
Deprecated. Adds a map phase to the job |
MapReduceBuilder |
reduce(MapReduceFunction function,
boolean keep)
Deprecated. Adds a reduce phase to the job |
MapReduceBuilder |
reduce(MapReduceFunction function,
Object arg,
boolean keep)
Deprecated. Adds a reduce phase to the job |
void |
removeRiakObject(String bucket,
String key)
Deprecated. Removes a Riak object (bucket name/key pair) for the job's input list |
MapReduceBuilder |
setBucket(String newBucket)
Deprecated. Sets the name of the Riak bucket the map/reduce job will process |
MapReduceBuilder |
setRiakClient(RiakClient client)
Deprecated. |
MapReduceBuilder |
setRiakObjects(Collection<RiakObject> objects)
Deprecated. |
MapReduceBuilder |
setRiakObjects(Map<String,Set<String>> objects)
Deprecated. Sets a collection of Riak object (bucket name/key pair) as the map/reduce job as inputs |
void |
setTimeout(int timeout)
Deprecated. How long the map/reduce job is allowed to execute Time is in milliseconds |
MapReduceResponse |
submit()
Deprecated. |
MapReduceResponse |
submit(RequestMeta meta)
Deprecated. Submits the job to the Riak server |
JSONObject |
toJSON()
Deprecated. Builds the JSON representation of a map/reduce job |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MapReduceBuilder(RiakClient riak)
riak - RiakClient instance which is pointing to the map/reduce URLpublic MapReduceBuilder()
| Method Detail |
|---|
public RiakClient getRiakClient()
RiakClient to which this map reduce job will be submitted to
when submit() is called.
public MapReduceBuilder setRiakClient(RiakClient client)
public String getBucket()
public MapReduceBuilder setBucket(String newBucket)
IllegalStateException - - If objects have already been added to the job
public void addRiakObject(String bucket,
String key)
IllegalStateException - - If a bucket name has already been set on the job
public void removeRiakObject(String bucket,
String key)
public Map<String,Set<String>> getRiakObjects()
public MapReduceBuilder setRiakObjects(Map<String,Set<String>> objects)
IllegalStateException - - If a bucket name has already been set on the jobpublic MapReduceBuilder setRiakObjects(Collection<RiakObject> objects)
public void clearRiakObjects()
public void setTimeout(int timeout)
public int getTimeout()
public MapReduceBuilder keyFilter(MapReduceFilter... filters)
function - function to run for the phasekeep - should the server keep and return the results
public MapReduceBuilder map(MapReduceFunction function,
boolean keep)
function - function to run for the phasekeep - should the server keep and return the results
public MapReduceBuilder map(MapReduceFunction function,
Object arg,
boolean keep)
function - function to run for the phasearg - Static argument to pass to the function. Should be an
object easily converted to JSONkeep - should the server keep and return the results
public MapReduceBuilder reduce(MapReduceFunction function,
boolean keep)
function - function to run for the phasekeep - should the server keep and return the results
public MapReduceBuilder reduce(MapReduceFunction function,
Object arg,
boolean keep)
function - function to run for the phasearg - Static argument to pass to the function. Should be an
object easily converted to JSONkeep - should the server keep and return the results
public MapReduceBuilder link(String bucket,
boolean keep)
bucket - bucket to link walkkeep - should the server keep and return the results
public MapReduceBuilder link(String bucket,
String tag,
boolean keep)
bucket - bucket to link walktag - link tag to matchkeep - should the server keep and return the results
public MapReduceResponse submit(RequestMeta meta)
meta - Extra metadata to attach to the request such as HTTP headers
or query parameters.
MapReduceResponse containing job results
IllegalStateException - If this job has not been associated with a Riak instance by
calling setRiakClient(RiakClient)
RiakIORuntimeException - If an error occurs during communication with the Riak server.
RiakResponseRuntimeException - If the Riak server returns a malformed response.
public MapReduceResponse submit()
throws JSONException
JSONExceptionpublic JSONObject toJSON()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||