protected void processStorageFormat(String name) throws SemanticException {
if (name.isEmpty()) {
throw new SemanticException("File format in STORED AS clause cannot be empty");
}
StorageFormatDescriptor descriptor = storageFormatFactory.get(name);
if (descriptor == null) {
throw new SemanticException("Unrecognized file format in STORED AS clause:" +
" '" + name + "'");
}
inputFormat = ensureClassExists(descriptor.getInputFormat());
outputFormat = ensureClassExists(descriptor.getOutputFormat());
if (serde == null) {
serde = ensureClassExists(descriptor.getSerde());
}
if (serde == null) {
// RCFile supports a configurable SerDe
if (name.equalsIgnoreCase(IOConstants.RCFILE)) {
serde = ensureClassExists(HiveConf.getVar(conf, HiveConf.ConfVars.HIVEDEFAULTRCFILESERDE));