Search in sources :

Example 6 with TMutation

use of org.apache.accumulo.core.data.thrift.TMutation in project accumulo by apache.

the class Mutation method toThrift.

private TMutation toThrift(boolean serialize) {
    if (serialize) {
        this.serialize();
    }
    ByteBuffer data = serializedSnapshot();
    TMutation tmutation = new TMutation(ByteBuffer.wrap(row), data, ByteBufferUtil.toByteBuffers(values), entries);
    if (!this.replicationSources.isEmpty()) {
        tmutation.setSources(new ArrayList<>(replicationSources));
    }
    return tmutation;
}
Also used : TMutation(org.apache.accumulo.core.data.thrift.TMutation) ByteBuffer(java.nio.ByteBuffer)

Aggregations

TMutation (org.apache.accumulo.core.data.thrift.TMutation)6 Test (org.junit.Test)4 ByteArrayOutputStream (java.io.ByteArrayOutputStream)2 DataOutputStream (java.io.DataOutputStream)2 BatchWriterConfig (org.apache.accumulo.core.client.BatchWriterConfig)2 Mutation (org.apache.accumulo.core.data.Mutation)2 WalEdits (org.apache.accumulo.core.replication.thrift.WalEdits)2 ServerMutation (org.apache.accumulo.server.data.ServerMutation)2 LogFileKey (org.apache.accumulo.tserver.logger.LogFileKey)2 ByteBuffer (java.nio.ByteBuffer)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 KeyExtent (org.apache.accumulo.core.data.impl.KeyExtent)1 TCondition (org.apache.accumulo.core.data.thrift.TCondition)1 TConditionalMutation (org.apache.accumulo.core.data.thrift.TConditionalMutation)1 TKeyExtent (org.apache.accumulo.core.data.thrift.TKeyExtent)1