Java Code Examples for org.apache.parquet.io.api.Binary#toStringUsingUTF8()

The following examples show how to use org.apache.parquet.io.api.Binary#toStringUsingUTF8() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ThriftRecordConverter.java    From parquet-mr with Apache License 2.0 6 votes vote down vote up
@Override
public void addBinary(final Binary value) {
  final Integer id = enumLookup.get(value);

  if (id == null) {
    throw new ParquetDecodingException("Unrecognized enum value: "
        + value.toStringUsingUTF8()
        + " known values: "
        + enumLookup
        + " in " + this.field);
  }

  events.add(new ParquetProtocol("readI32() enum") {
    @Override
    public int readI32() throws TException {
      return id;
    }
  });
}
 
Example 2
Source File: AvroIndexedRecordConverter.java    From parquet-mr with Apache License 2.0 5 votes vote down vote up
@Override
final public void addBinary(Binary value) {
  Object enumValue = value.toStringUsingUTF8();
  if (enumClass != null) {
    enumValue = (Enum.valueOf(enumClass,(String)enumValue));
  }
  parent.add(enumValue);
}
 
Example 3
Source File: PrimitiveStringifier.java    From parquet-mr with Apache License 2.0 4 votes vote down vote up
@Override
String stringifyNotNull(Binary value) {
  return value.toStringUsingUTF8();
}
 
Example 4
Source File: ProtoMessageConverter.java    From parquet-mr with Apache License 2.0 4 votes vote down vote up
@Override
public void addBinary(Binary binary) {
  String str = binary.toStringUsingUTF8();
  parent.add(str);
}
 
Example 5
Source File: MapConverter.java    From parquet-mr with Apache License 2.0 4 votes vote down vote up
@Override
final public void addBinary(Binary value) {
  currentKey = value.toStringUsingUTF8();
}
 
Example 6
Source File: AvroConverters.java    From parquet-mr with Apache License 2.0 4 votes vote down vote up
@Override
public String convert(Binary binary) {
  return binary.toStringUsingUTF8();
}