Search in sources :

Example 6 with ThriftMessageUtil

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);
}
Also used : ByteBuffer(java.nio.ByteBuffer) ThriftMessageUtil(org.apache.accumulo.core.util.ThriftMessageUtil)

Aggregations

ThriftMessageUtil (org.apache.accumulo.core.util.ThriftMessageUtil)6 ByteBuffer (java.nio.ByteBuffer)3 TAuthenticationTokenIdentifier (org.apache.accumulo.core.security.thrift.TAuthenticationTokenIdentifier)1 TAuthenticationKey (org.apache.accumulo.core.securityImpl.thrift.TAuthenticationKey)1 TAuthenticationTokenIdentifier (org.apache.accumulo.core.securityImpl.thrift.TAuthenticationTokenIdentifier)1