use of org.apache.parquet.pig.PigMetaData in project parquet-mr by apache.
the class AbstractThriftWriteSupport method init.
protected void init(Class<T> thriftClass) {
this.thriftClass = thriftClass;
this.thriftStruct = getThriftStruct();
this.schema = ThriftSchemaConverter.convertWithoutProjection(thriftStruct);
final Map<String, String> extraMetaData = new ThriftMetaData(thriftClass.getName(), thriftStruct).toExtraMetaData();
// TODO: make this work for non-tbase types
if (isPigLoaded() && TBase.class.isAssignableFrom(thriftClass)) {
new PigMetaData(new ThriftToPig((Class<? extends TBase<?, ?>>) thriftClass).toSchema()).addToMetaData(extraMetaData);
}
this.writeContext = new WriteContext(schema, extraMetaData);
}
Aggregations