net.sf.eos.hadoop.mapred
Interface KeyGenerator<K extends WritableComparable>

Type Parameters:
K - the type of the key in a mapreduce environment
All Known Implementing Classes:
AbstractKeyGenerator, IdMetadataKeyGenerator, TextMetaKeyGenerator

public interface KeyGenerator<K extends WritableComparable>

The key generator creates a key for the given document. The advantage is the support for replaceable strategies in key generation.

Implementations must be stateless.

Author:
Sascha Kohlmann

Method Summary
 Map<K,EosDocument> createKeysForDocument(EosDocument doc)
          Creates a new key.
 

Method Detail

createKeysForDocument

Map<K,EosDocument> createKeysForDocument(EosDocument doc)
                                                                    throws EosException
Creates a new key.

Parameters:
doc - the document to create a key for
Returns:
the key
Throws:
EosException - if an error occurs


Copyright © 2008. All Rights Reserved.