org.apache.pig
Interface OverwritableStoreFunc

All Known Implementing Classes:
CSVExcelStorage, HiveColumnarStorage, IndexedStorage, PigStorage, PigStorageSchema

public interface OverwritableStoreFunc

A StoreFunc should implement this interface to enable overwriting its store/output location if it already exists.


Method Summary
 void cleanupOutput(POStore store, org.apache.hadoop.mapreduce.Job job)
          This method is called to cleanup the store/output location of this StoreFunc.
 boolean shouldOverwrite()
          This method is called by the Pig runtime to determine whether to ignore output validation problems (see PigOutputFormat.checkOutputSpecs(org.apache.hadoop.mapreduce.JobContext) and InputOutputFileValidator#validate) and to delete the existing output.
 

Method Detail

shouldOverwrite

boolean shouldOverwrite()
This method is called by the Pig runtime to determine whether to ignore output validation problems (see PigOutputFormat.checkOutputSpecs(org.apache.hadoop.mapreduce.JobContext) and InputOutputFileValidator#validate) and to delete the existing output.

Returns:
whether to overwrite the store/output location of this StoreFunc.

cleanupOutput

void cleanupOutput(POStore store,
                   org.apache.hadoop.mapreduce.Job job)
                   throws IOException
This method is called to cleanup the store/output location of this StoreFunc.

Parameters:
store - The POStore object to get info about the store operator for this store function.
job - The Job object to get job related information.
Throws:
IOException - if an exception occurs during the cleanup.


Copyright © 2007-2012 The Apache Software Foundation