The raw size of the underlying `Append'.
()
| 519 | |
| 520 | /** The raw size of the underlying `Append'. */ |
| 521 | int predictAppendSize() { |
| 522 | int size = 0; |
| 523 | size += 1; // byte: Type of the 2nd parameter. |
| 524 | size += 1; // byte: Type again (see HBASE-2877). |
| 525 | |
| 526 | size += 1; // byte: Version of Append. |
| 527 | size += 3; // vint: row key length (3 bytes => max length = 32768). |
| 528 | size += key.length; // The row key. |
| 529 | size += 8; // long: Timestamp. |
| 530 | size += 8; // long: Lock ID. |
| 531 | size += 1; // bool: Whether or not to write to the WAL. |
| 532 | size += 4; // int: Number of families for which we have edits. |
| 533 | |
| 534 | size += 1; // vint: Family length (guaranteed on 1 byte). |
| 535 | size += family.length; // The family. |
| 536 | size += 4; // int: Number of KeyValues that follow. |
| 537 | size += 4; // int: Total number of bytes for all those KeyValues. |
| 538 | |
| 539 | size += payloadSize(); |
| 540 | |
| 541 | return size; |
| 542 | } |
| 543 | |
| 544 | @Override |
| 545 | MutationProto toMutationProto() { |
no test coverage detected