net.sf.eos.hadoop.mapred.cooccurrence
Class IdMetadataKeyGenerator

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.cooccurrence.IdMetadataKeyGenerator
All Implemented Interfaces:
Configurable, KeyGenerator<Text>

public class IdMetadataKeyGenerator
extends AbstractKeyGenerator<Text>

Creates a new map based on the document metadata value of EosDocument.ID_META_KEY and optionally other metadata information. Will sort optional metadata values.

Author:
Sascha Kohlmann

Field Summary
static String META_FIELD_FOR_SEPARATION_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
IdMetadataKeyGenerator()
           
 
Method Summary
 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
configure, getConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

META_FIELD_FOR_SEPARATION_CONFIG_NAME

@ConfigurationKey(description="Metakeys, comma delimited, for separation.")
public static final String META_FIELD_FOR_SEPARATION_CONFIG_NAME
The meta field for separation. Default value is EosDocument.YEAR_META_KEY.

See Also:
Constant Field Values
Constructor Detail

IdMetadataKeyGenerator

public IdMetadataKeyGenerator()
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 doc doesn't contains a metadata value for EosDocument.ID_META_KEY.


Copyright © 2008. All Rights Reserved.