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

Method predictPutSize

src/PutRequest.java:504–525  ·  view source on GitHub ↗

The raw size of the underlying `Put'.

()

Source from the content-addressed store, hash-verified

502
503 /** The raw size of the underlying `Put'. */
504 int predictPutSize() {
505 int size = 0;
506 size += 1; // byte: Type of the 2nd parameter.
507 size += 1; // byte: Type again (see HBASE-2877).
508
509 size += 1; // byte: Version of Put.
510 size += 3; // vint: row key length (3 bytes => max length = 32768).
511 size += key.length; // The row key.
512 size += 8; // long: Timestamp.
513 size += 8; // long: Lock ID.
514 size += 1; // bool: Whether or not to write to the WAL.
515 size += 4; // int: Number of families for which we have edits.
516
517 size += 1; // vint: Family length (guaranteed on 1 byte).
518 size += family.length; // The family.
519 size += 4; // int: Number of KeyValues that follow.
520 size += 4; // int: Total number of bytes for all those KeyValues.
521
522 size += payloadSize();
523
524 return size;
525 }
526
527 @Override
528 MutationProto toMutationProto() {

Callers 2

predictSerializedSizeMethod · 0.95
predictSerializedSizeMethod · 0.80

Calls 1

payloadSizeMethod · 0.95

Tested by

no test coverage detected