[
https://issues.apache.org/jira/browse/HBASE-5746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13627514#comment-13627514
]
stack commented on HBASE-5746:
------------------------------
[~sershe] Why we need a dummy header at all? Is it space filler in
extraordinary circumstance? I can't tell reading patch.
What is this used for?
{code}
/**
+ * Return the appropriate DUMMY_HEADER for the minor version
+ */
+ public byte[] getDummyHeaderForVersion() {
+ return getDummyHeaderForVersion(minorVersion);
+ }
+
+ /**
+ * Return the appropriate DUMMY_HEADER for the minor version
+ */
+ static private byte[] getDummyHeaderForVersion(int minorVersion) {
+ if (minorVersion < MINOR_VERSION_WITH_CHECKSUM) {
+ return DUMMY_HEADER_NO_CHECKSUM;
+ }
+ return DUMMY_HEADER;
+ }
{code}
Thanks Sergey.
> HFileDataBlockEncoderImpl uses wrong header size when reading HFiles with no
> checksums (0.96)
> ---------------------------------------------------------------------------------------------
>
> Key: HBASE-5746
> URL: https://issues.apache.org/jira/browse/HBASE-5746
> Project: HBase
> Issue Type: Sub-task
> Components: io, regionserver
> Reporter: Lars Hofhansl
> Assignee: Sergey Shelukhin
> Priority: Critical
> Fix For: 0.95.1
>
> Attachments: 5720-trunk-v2.txt, HBASE-5746-v0.patch
>
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira