public class MetadataConfiguration extends Object
SequenceFile
by the
MetadataSequenceFileOutputFormat
.
Standard usage would be to use the setMetadata(Map, Configuration)
method to add the given metadata to the Configuration
in the
part of the code that runs locally (i.e. in a Tool.run(String[])
method).
The configuration would then be distributed across the cluster, and any
mappers or reducers that use the MetadataSequenceFileOutputFormat
will automatically have the metadata added to their output file(s).
Modifier and Type | Field and Description |
---|---|
static String |
COMMENT_KEY
Standard key for a comment metadata item
|
static String |
CONTENT_TYPE_KEY
Standard key for a storing an indicator of the mime-type of the value fields
|
static String |
UUID_KEY
Standard key for a unique identifier metadata item
|
Modifier and Type | Method and Description |
---|---|
static org.apache.hadoop.io.SequenceFile.Metadata |
getMetadata(org.apache.hadoop.conf.Configuration conf)
Read any metadata stored in the
Configuration . |
static void |
setMetadata(Map<String,String> metadata,
org.apache.hadoop.conf.Configuration conf)
Write the given metadata to the
Configuration . |
public static final String UUID_KEY
public static final String COMMENT_KEY
public static final String CONTENT_TYPE_KEY
public static org.apache.hadoop.io.SequenceFile.Metadata getMetadata(org.apache.hadoop.conf.Configuration conf)
Configuration
.conf
- the configurationpublic static void setMetadata(Map<String,String> metadata, org.apache.hadoop.conf.Configuration conf)
Configuration
.metadata
- the metadata.conf
- the configuration.