net.sf.eos.hadoop.mapred.decompose
Class TextMetaKeyGenerator

java.lang.Object
  extended by net.sf.eos.config.Configured
      extended by net.sf.eos.hadoop.mapred.AbstractKeyGenerator<Text>
          extended by net.sf.eos.hadoop.mapred.decompose.TextMetaKeyGenerator
All Implemented Interfaces:
Configurable, KeyGenerator<Text>

public class TextMetaKeyGenerator
extends AbstractKeyGenerator<Text>


Field Summary
static String META_FIELD_FOR_KEY_CONFIG_NAME
          The meta field for separation.
 
Fields inherited from class net.sf.eos.hadoop.mapred.AbstractKeyGenerator
ABSTRACT_KEY_GENERATOR_IMPL_CONFIG_NAME
 
Constructor Summary
TextMetaKeyGenerator()
           
 
Method Summary
 void configure(Configuration config)
          Creates a copy of the given Configuration and stores it in a manner that Configured.getConfiguration() can reach it.
 Map<Text,EosDocument> createKeysForDocument(EosDocument doc)
          Creates a new key.
 
Methods inherited from class net.sf.eos.hadoop.mapred.AbstractKeyGenerator
newInstance
 
Methods inherited from class net.sf.eos.config.Configured
getConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

META_FIELD_FOR_KEY_CONFIG_NAME

public static final String META_FIELD_FOR_KEY_CONFIG_NAME
The meta field for separation.

Default value is EosDocument.YEAR_META_KEY.

See Also:
Constant Field Values
Constructor Detail

TextMetaKeyGenerator

public TextMetaKeyGenerator()
Method Detail

createKeysForDocument

public Map<Text,EosDocument> createKeysForDocument(EosDocument doc)
                                            throws EosException
Description copied from interface: KeyGenerator
Creates a new key.

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

configure

public void configure(Configuration config)
Description copied from class: Configured
Creates a copy of the given Configuration and stores it in a manner that Configured.getConfiguration() can reach it.

If override the method first call super in the overriding method.

Specified by:
configure in interface Configurable
Overrides:
configure in class Configured
Parameters:
config - the Configuration to copy.


Copyright © 2008. All Rights Reserved.