use of org.apache.parquet.hadoop.thrift.ThriftWriteSupport in project parquet-mr by apache.
the class TupleToThriftWriteSupport method init.
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public WriteContext init(Configuration configuration) {
try {
Class<?> clazz = configuration.getClassByName(className).asSubclass(TBase.class);
thriftWriteSupport = new ThriftWriteSupport(clazz);
pigToThrift = new PigToThrift(clazz);
return thriftWriteSupport.init(configuration);
} catch (ClassNotFoundException e) {
throw new BadConfigurationException("The thrift class name was not found: " + className, e);
} catch (ClassCastException e) {
throw new BadConfigurationException("The thrift class name should extend TBase: " + className, e);
}
}
Aggregations