@@ -0,0 +1,2170 @@
+/*%0A * Licensed to the Apache Software Foundation (ASF) under one%0A * or more contributor license agreements.  See the NOTICE file%0A * distributed with this work for additional information%0A * regarding copyright ownership.  The ASF licenses this file%0A * to you under the Apache License, Version 2.0 (the%0A * %22License%22); you may not use this file except in compliance%0A * with the License.  You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage org.apache.pig;%0A%0Aimport java.io.IOException;%0A%0Aimport org.apache.hadoop.mapreduce.Job;%0Aimport org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputFormat;%0Aimport org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POStore;%0Aimport org.apache.pig.newplan.logical.rules.InputOutputFileValidator;%0A%0A/**%0A * A %7B@link StoreFunc%7D should implement this interface to enable overwriting its%0A * store/output location if it already exists.%0A */%0Apublic interface OverwritableStoreFunc %7B%0A    /**%0A     * This method is called by the Pig runtime to determine whether to ignore output validation problems%0A     * (see %7B@link PigOutputFormat#checkOutputSpecs%7D and %7B@link InputOutputFileValidator#validate%7D) and to delete the existing output.%0A     * @return whether to overwrite the store/output location of this %7B@link StoreFunc%7D.%0A     */%0A    public boolean shouldOverwrite();%0A%0A    /**%0A     * This method is called to cleanup the store/output location of this %7B@link StoreFunc%7D.%0A     * %0A     * @param store The %7B@link POStore%7D object to get info about the store%0A     * operator for this store function.%0A     * @param job The %7B@link Job%7D object to get job related information.%0A     * @throws IOException if an exception occurs during the cleanup.%0A     */    %0A    public void cleanupOutput(POStore store, Job job) throws IOException;%0A%7D%0A

allow store to overwrite existing directroy (PIG-259.9.patch)