}
private Schema determineSchema() throws IOException {
if(!mDeterminedSchemaCached) {
if(LoadMetadata.class.isAssignableFrom(mLoadFunc.getClass())) {
LoadMetadata loadMetadata = (LoadMetadata)mLoadFunc;
ResourceSchema rSchema = loadMetadata.getSchema(
mInputFileSpec.getFileName(), new Job(conf));
mDeterminedSchema = Schema.getPigSchema(rSchema);
}
// set the flag so that future calls just use mDeterminedSchema
mDeterminedSchemaCached = true;