You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by an...@apache.org on 2014/02/04 18:22:49 UTC
svn commit: r1564385 -
/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterV3.java
Author: anoopsamjohn
Date: Tue Feb 4 17:22:49 2014
New Revision: 1564385
URL: http://svn.apache.org/r1564385
Log:
HBASE-10454 Tags presence file info can be wrong in HFiles when PrefixTree encoding is used.
Modified:
hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterV3.java
Modified: hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterV3.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterV3.java?rev=1564385&r1=1564384&r2=1564385&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterV3.java (original)
+++ hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterV3.java Tue Feb 4 17:22:49 2014
@@ -188,7 +188,11 @@ public class HFileWriterV3 extends HFile
protected void finishFileInfo() throws IOException {
super.finishFileInfo();
- if (hFileContext.isIncludesTags()) {
+ if (hFileContext.getDataBlockEncoding() == DataBlockEncoding.PREFIX_TREE) {
+ // In case of Prefix Tree encoding, we always write tags information into HFiles even if all
+ // KVs are having no tags.
+ fileInfo.append(FileInfo.MAX_TAGS_LEN, Bytes.toBytes(this.maxTagsLength), false);
+ } else if (hFileContext.isIncludesTags()) {
// When tags are not being written in this file, MAX_TAGS_LEN is excluded
// from the FileInfo
fileInfo.append(FileInfo.MAX_TAGS_LEN, Bytes.toBytes(this.maxTagsLength), false);