use of org.apache.thrift.protocol.TList in project pinpoint by naver.
the class TReplaceListProtocol method writeListBegin.
@Override
public void writeListBegin(TList list) throws TException {
if (!writeFieldBegin) {
protocol.writeListBegin(list);
return;
}
if (writeListDepth == 0 && currentField != null) {
List<ByteArrayOutput> outputs = replaceFields.get(currentField.name);
if (outputs == null) {
throw new TException("not found replace field - " + currentField.name);
}
final TList replaceList = new TList(list.elemType, outputs.size());
protocol.writeListBegin(replaceList);
for (ByteArrayOutput output : outputs) {
try {
final OutputStream out = ((ByteArrayOutputStreamTransport) getTransport()).getByteArrayOutputStream();
output.writeTo(out);
} catch (IOException e) {
throw new TException(e);
}
}
}
writeListDepth++;
}
use of org.apache.thrift.protocol.TList in project elephant-bird by twitter.
the class ThriftProtocolWrapper method readListBegin.
@Override
public TList readListBegin() throws TException {
TList list = wrapped.readListBegin();
checkContainerElemType(list.elemType);
return list;
}
use of org.apache.thrift.protocol.TList in project parquet-mr by apache.
the class DefaultEventsVisitor method visit.
@Override
public Void visit(final ThriftType.ListType listType, Void v) {
dummyEvents.add(new ParquetProtocol("readListBegin()") {
@Override
public TList readListBegin() throws TException {
return new TList();
}
});
dummyEvents.add(new ParquetProtocol("readListEnd()") {
@Override
public void readListEnd() throws TException {
}
});
return null;
}
Aggregations