use of com.navercorp.pinpoint.hbase.schema.definition.xml.HbaseSchema in project pinpoint by naver.
the class XmlHbaseSchemaParser method parseSchema.
XmlHbaseSchemaParseResult parseSchema(InputSource inputSource) {
try {
Unmarshaller unmarshaller = JAXB_CONTEXT.createUnmarshaller();
unmarshaller.setSchema(SCHEMA);
HbaseSchema hbaseSchema = (HbaseSchema) unmarshaller.unmarshal(inputSource);
return mapper.map(hbaseSchema);
} catch (JAXBException e) {
Throwable linkedException = e.getLinkedException();
if (linkedException == null) {
throw new IllegalStateException("JAXB error", e);
}
throw new HbaseSchemaParseException(linkedException.getMessage(), linkedException);
}
}
Aggregations