* to output format implementation.
*/
@Override
protected void visit(LOStore store) throws PlanValidationException{
StoreFuncInterface sf = store.getStoreFunc();
String outLoc = store.getOutputFile().getFileName();
String errMsg = "Unexpected error. Could not validate the output " +
"specification for: "+outLoc;
int errCode = 2116;
try {
if(store.getSchema() != null){
sf.checkSchema(new ResourceSchema(store.getSchema(), store.getSortInfo()));
}
} catch (FrontendException e) {
msgCollector.collect(errMsg, MessageType.Error) ;
throw new PlanValidationException(errMsg, errCode, pigCtx.getErrorSource(), e);
} catch (IOException e) {
msgCollector.collect(errMsg, MessageType.Error) ;
throw new PlanValidationException(errMsg, errCode, pigCtx.getErrorSource(), e);
}
Job dummyJob;
try {
dummyJob = new Job(ConfigurationUtil.toConfiguration(pigCtx.getProperties()));
sf.setStoreLocation(outLoc, dummyJob);
} catch (IOException ioe) {
msgCollector.collect(errMsg, MessageType.Error) ;
throw new PlanValidationException(errMsg, errCode, pigCtx.getErrorSource(), ioe);
}
try {
sf.getOutputFormat().checkOutputSpecs(dummyJob);
} catch (IOException ioe) {
byte errSrc = pigCtx.getErrorSource();
errCode = 0;
switch(errSrc) {
case PigException.BUG: