net.sf.eos.hadoop.mapred.cooccurrence
Class IdMetadataKeyGenerator
java.lang.Object
net.sf.eos.config.Configured
net.sf.eos.hadoop.mapred.AbstractKeyGenerator<Text>
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
IdMetadataKeyGenerator
public IdMetadataKeyGenerator()
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.