Search in sources :

Example 11 with TSet

use of org.apache.thrift.protocol.TSet in project elephant-bird by twitter.

the class ThriftProtocolWrapper method readSetBegin.

@Override
public TSet readSetBegin() throws TException {
    TSet set = wrapped.readSetBegin();
    checkContainerElemType(set.elemType);
    return set;
}
Also used : TSet(org.apache.thrift.protocol.TSet)

Example 12 with TSet

use of org.apache.thrift.protocol.TSet in project elephant-bird by twitter.

the class ThriftBinaryProtocol method readSetBegin.

@Override
public TSet readSetBegin() throws TException {
    TSet set = super.readSetBegin();
    checkContainerSize(set.size);
    checkContainerElemType(set.elemType);
    return set;
}
Also used : TSet(org.apache.thrift.protocol.TSet)

Example 13 with TSet

use of org.apache.thrift.protocol.TSet in project parquet-mr by apache.

the class BufferedProtocolReadToWrite method readOneSet.

private boolean readOneSet(TProtocol in, List<Action> buffer, SetType expectedType) throws TException {
    final TSet set = in.readSetBegin();
    buffer.add(new Action() {

        @Override
        public void write(TProtocol out) throws TException {
            out.writeSetBegin(set);
        }

        @Override
        public String toDebugString() {
            return "<e=" + set.elemType + ", s=" + set.size + ">{*";
        }
    });
    boolean hasFieldsIgnored = readCollectionElements(in, set.size, set.elemType, buffer, expectedType.getValues().getType());
    in.readSetEnd();
    buffer.add(SET_END);
    return hasFieldsIgnored;
}
Also used : TException(org.apache.thrift.TException) TProtocol(org.apache.thrift.protocol.TProtocol) TSet(org.apache.thrift.protocol.TSet)

Aggregations

TSet (org.apache.thrift.protocol.TSet)13 TList (org.apache.thrift.protocol.TList)4 TMap (org.apache.thrift.protocol.TMap)4 Map (java.util.Map)3 EnumMap (java.util.EnumMap)2 HashMap (java.util.HashMap)2 HashSet (java.util.HashSet)2 Set (java.util.Set)2 PList (net.morimekta.providence.descriptor.PList)2 PMap (net.morimekta.providence.descriptor.PMap)2 PSet (net.morimekta.providence.descriptor.PSet)2 TException (org.apache.thrift.TException)2 ByteBuffer (java.nio.ByteBuffer)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 PEnumValue (net.morimekta.providence.PEnumValue)1 PDescriptor (net.morimekta.providence.descriptor.PDescriptor)1 PEnumDescriptor (net.morimekta.providence.descriptor.PEnumDescriptor)1 SerializerException (net.morimekta.providence.serializer.SerializerException)1 ListObjectInspector (org.apache.hadoop.hive.serde2.objectinspector.ListObjectInspector)1