public enum NamingStrategy extends Enum<NamingStrategy>
Enum Constant and Description |
---|
KEY
Use the key value as the filename
|
NUMERICAL
Number the files sequentially
|
Modifier and Type | Method and Description |
---|---|
<K,V> String |
getName(K key,
V value,
ExtractionState state,
boolean addExtension)
Generate the filename for the given record (key-value pair).
|
protected abstract <K,V> String |
getNameInternal(K key,
V value,
ExtractionState state) |
static NamingStrategy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static NamingStrategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NamingStrategy KEY
public static final NamingStrategy NUMERICAL
public static NamingStrategy[] values()
for (NamingStrategy c : NamingStrategy.values()) System.out.println(c);
public static NamingStrategy valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullprotected abstract <K,V> String getNameInternal(K key, V value, ExtractionState state)
public <K,V> String getName(K key, V value, ExtractionState state, boolean addExtension)
BytesWritable
, then
a mime-type sniffing process takes place in order to "guess" an extension
which will be added to the end of the generated filename.K
- key typeV
- value typekey
- the keyvalue
- the valuestate
- the extraction stateaddExtension
- should the file extension be guessed and added automatically