org.apache.pig
Interface StoreMetadata

All Known Implementing Classes:
JsonMetadata, PigStorageSchema, TableStorer

@InterfaceAudience.Public
@InterfaceStability.Evolving
public interface StoreMetadata

This interface defines how to write metadata related to data to be stored. If a given store function does not implement this interface, it will be assumed that it is unable to record metadata about the associated data.


Method Summary
 void storeSchema(ResourceSchema schema, String location, org.apache.hadoop.mapreduce.Job job)
          Store schema of the data being written
 void storeStatistics(ResourceStatistics stats, String location, org.apache.hadoop.mapreduce.Job job)
          Store statistics about the data being written.
 

Method Detail

storeStatistics

void storeStatistics(ResourceStatistics stats,
                     String location,
                     org.apache.hadoop.mapreduce.Job job)
                     throws IOException
Store statistics about the data being written.

Parameters:
stats - statistics to be recorded
location - Location as returned by LoadFunc.relativeToAbsolutePath(String, org.apache.hadoop.fs.Path)
job - The Job object - this should be used only to obtain cluster properties through JobContext.getConfiguration() and not to set/query any runtime job information.
Throws:
IOException

storeSchema

void storeSchema(ResourceSchema schema,
                 String location,
                 org.apache.hadoop.mapreduce.Job job)
                 throws IOException
Store schema of the data being written

Parameters:
schema - Schema to be recorded
location - Location as returned by LoadFunc.relativeToAbsolutePath(String, org.apache.hadoop.fs.Path)
job - The Job object - this should be used only to obtain cluster properties through JobContext.getConfiguration() and not to set/query any runtime job information.
Throws:
IOException


Copyright © ${year} The Apache Software Foundation