Java Code Examples for org.apache.thrift.protocol.TProtocol#readListEnd()
The following examples show how to use
org.apache.thrift.protocol.TProtocol#readListEnd() .
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: BufferedProtocolReadToWrite.java From parquet-mr with Apache License 2.0 | 6 votes |
private boolean readOneList(TProtocol in, List<Action> buffer, ListType expectedType) throws TException { final TList list = in.readListBegin(); buffer.add(new Action() { @Override public void write(TProtocol out) throws TException { out.writeListBegin(list); } @Override public String toDebugString() { return "<e=" + list.elemType + ", s=" + list.size + ">{"; } }); boolean hasFieldsIgnored = readCollectionElements(in, list.size, list.elemType, buffer, expectedType.getValues().getType()); in.readListEnd(); buffer.add(LIST_END); return hasFieldsIgnored; }
Example 2
Source File: ListTypeAdapterFactory.java From Firefly with Apache License 2.0 | 5 votes |
@Override public List read(TProtocol protocol) throws TException { TList tlist = protocol.readListBegin(); ArrayList arrayList = new ArrayList(tlist.size); for (int i = 0, n = tlist.size; i < n; i++) { arrayList.add(valueTypeAdapter.read(protocol)); } protocol.readListEnd(); return arrayList; }
Example 3
Source File: ProtocolReadToWrite.java From parquet-mr with Apache License 2.0 | 5 votes |
private void readOneList(TProtocol in, TProtocol out) throws TException { final TList list = in.readListBegin(); out.writeListBegin(list); readCollectionElements(in, out, list.size, list.elemType); in.readListEnd(); out.writeListEnd(); }
Example 4
Source File: TypedConsumer.java From parquet-format with Apache License 2.0 | 4 votes |
@Override final void read(TProtocol protocol, EventBasedThriftReader reader) throws TException { this.consumeList(protocol, reader, protocol.readListBegin()); protocol.readListEnd(); }
Example 5
Source File: TypedConsumer.java From parquet-mr with Apache License 2.0 | 4 votes |
@Override final void read(TProtocol protocol, EventBasedThriftReader reader) throws TException { this.consumeList(protocol, reader, protocol.readListBegin()); protocol.readListEnd(); }