use of org.apache.accumulo.core.util.ThriftMessageUtil in project accumulo by apache.
the class AuthenticationKey method write.
@Override
public void write(DataOutput out) throws IOException {
if (authKey == null) {
WritableUtils.writeVInt(out, 0);
return;
}
ThriftMessageUtil util = new ThriftMessageUtil();
ByteBuffer serialized = util.serialize(authKey);
WritableUtils.writeVInt(out, serialized.limit() - serialized.arrayOffset());
ByteBufferUtil.write(out, serialized);
}
Aggregations