Package org.apache.pig

Examples of org.apache.pig.CommittableStoreFunc


    private void commit(StoreFunc sFunc, Configuration conf,
            StoreConfig storeConfig, String sFuncString) throws IOException {
        if(sFunc != null && CommittableStoreFunc.class.isAssignableFrom(
                sFunc.getClass())) {
            CommittableStoreFunc csFunc = (CommittableStoreFunc)sFunc;
            // make a copy of the conf since we may be committing multiple
            // stores and set storeFunc and StoreConfig
            // pertaining to this store in the copy and use it
            Configuration confCopy = new Configuration(conf);
            confCopy.set("pig.storeFunc", ObjectSerializer.serialize(
                    sFuncString));
            confCopy.set(JobControlCompiler.PIG_STORE_CONFIG,
                    ObjectSerializer.serialize(storeConfig));
           
            csFunc.commit(confCopy);
        }
    }
View Full Code Here


   
    private void commit(StoreFunc sFunc, Configuration conf,
            String storeConfigSerializedString, String sFuncString) throws IOException {
        if(sFunc != null && CommittableStoreFunc.class.isAssignableFrom(
                sFunc.getClass())) {
            CommittableStoreFunc csFunc = (CommittableStoreFunc)sFunc;
            // make a copy of the conf since we may be committing multple
            // sores and set storeFunc and StoreConfig
            // pertaining to this store in the copy and use it
            Configuration confCopy = new Configuration(conf);
            confCopy.set("pig.storeFunc", ObjectSerializer.serialize(
                    sFuncString));
            confCopy.set(JobControlCompiler.PIG_STORE_CONFIG,
                    storeConfigSerializedString);
           
            csFunc.commit(confCopy);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.pig.CommittableStoreFunc

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.