MCPcopy Create free account
hub / github.com/OpenTSDB/asynchbase / payloadSize

Method payloadSize

src/DeleteRequest.java:541–561  ·  view source on GitHub ↗

Returns the serialized size of all the KeyValues in this RPC.

()

Source from the content-addressed store, hash-verified

539
540 /** Returns the serialized size of all the {@link KeyValue}s in this RPC. */
541 @Override
542 int payloadSize() {
543 if (family == WHOLE_ROW) {
544 return 0; // No payload when deleting whole rows.
545 }
546 int size = 0;
547 size += 4; // int: Total length of the whole KeyValue.
548 size += 4; // int: Total length of the key part of the KeyValue.
549 size += 4; // int: Length of the value part of the KeyValue.
550 size += 2; // short:Length of the key.
551 size += key.length; // The row key (again!).
552 size += 1; // byte: Family length (again!).
553 size += family.length; // The column family (again!).
554 size += 8; // long: The timestamp (again!).
555 size += 1; // byte: The type of KeyValue.
556 size *= qualifiers.length;
557 for (final byte[] qualifier : qualifiers) {
558 size += qualifier.length; // The column qualifier.
559 }
560 return size;
561 }
562
563 @Override
564 MutationProto toMutationProto() {

Callers 1

predictSerializedSizeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected