|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectMapReduce
public abstract class MapReduce
MapReduce framework.
Field Summary | |
---|---|
static int |
XNOCOMP
execution option: avoid compression of temporary databases |
static int |
XNOLOCK
execution option: avoid locking against update operations |
Constructor Summary | |
---|---|
MapReduce()
|
Method Summary | |
---|---|
protected boolean |
emit(byte[] key,
byte[] value)
Emit a record from the mapper. |
boolean |
execute(DB db,
String tmppath,
int opts)
Execute the MapReduce process about a database. |
boolean |
log(String name,
String message)
Process a log message. |
abstract boolean |
map(byte[] key,
byte[] value)
Map a record data. |
boolean |
midprocess()
Mediate between the map and the reduce phases. |
boolean |
postprocess()
Postprocess the reduce operations. |
boolean |
preprocess()
Preprocess the map operations. |
abstract boolean |
reduce(byte[] key,
ValueIterator iter)
Reduce a record data. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int XNOCOMP
public static final int XNOLOCK
Constructor Detail |
---|
public MapReduce()
Method Detail |
---|
protected boolean emit(byte[] key, byte[] value)
key
- specifies the key.value
- specifies the value.
public boolean execute(DB db, String tmppath, int opts)
db
- the source database.tmppath
- the path of a directory for the temporary data storage. If it is an empty
string, temporary data are handled on memory.opts
- the optional features by bitwise-or: MapReduce::XNOLOCK to avoid locking
against update operations by other threads, MapReduce::XNOCOMP to avoid compression of
temporary databases.
public boolean log(String name, String message)
name
- the name of the event.message
- a supplement message.
public abstract boolean map(byte[] key, byte[] value)
key
- specifies the key.value
- specifies the value.
public boolean midprocess()
public boolean postprocess()
public boolean preprocess()
public abstract boolean reduce(byte[] key, ValueIterator iter)
key
- specifies the key.iter
- the iterator to get the values.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |