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);
}
}