com.bigdata.service.mapred
Interface IReduceTask

All Superinterfaces:
ITask, Serializable
All Known Implementing Classes:
AbstractReduceTask, CountKeywords

public interface IReduceTask
extends ITask

Interface for a reduce task to be executed on a map/reduce client.

Version:
$Id: IReduceTask.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

Method Summary
 UUID getDataService()
          The IDataService from which the reduce task will read its input.
 void reduce(byte[] key, Iterator<byte[]> vals)
          Each reduce task will be presented with a series of key-value pairs in key order.
 
Methods inherited from interface com.bigdata.service.mapred.ITask
getUUID
 

Method Detail

getDataService

UUID getDataService()
The IDataService from which the reduce task will read its input.


reduce

void reduce(byte[] key,
            Iterator<byte[]> vals)
            throws Exception
Each reduce task will be presented with a series of key-value pairs in key order. However, the keys will be distributed across the N reduce tasks by the used defined hash function, so this is NOT a total ordering over the intermediate keys.

Note: This method is never invoked for a key for which there are no values.

Parameters:
key - A key.
vals - An iterator that will visit the set of values for that key.
Throws:
Exception


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.