table.setProperty(CUSTOM_PROPERTIES_PROPERTY_NAME,
NAME_JOINER.join(descriptor.listProperties()));
}
// translate from Format to SerDe
final Format format = descriptor.getFormat();
if (FORMAT_TO_SERDE.containsKey(format)) {
table.setSerializationLib(FORMAT_TO_SERDE.get(format));
try {
table.setInputFormatClass(FORMAT_TO_INPUT_FORMAT.get(format));
table.setOutputFormatClass(FORMAT_TO_OUTPUT_FORMAT.get(format));
} catch (HiveException ex) {
throw new MetadataProviderException(
"Failed to set input/output formats for format:" +
format.getName(), ex);
}
} else {
throw new UnknownFormatException(
"No known serde for format:" + format.getName());
}
try {
} catch (Exception e) {
throw new MetadataProviderException("Error configuring Hive Avro table, " +
"table creation failed", e);