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:21:32 UTC
svn commit: r1564384 -
/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterV3.java
Author: anoopsamjohn
Date: Tue Feb 4 17:21:32 2014
New Revision: 1564384
URL: http://svn.apache.org/r1564384
Log:
HBASE-10454 Tags presence file info can be wrong in HFiles when PrefixTree encoding is used.
Modified:
hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterV3.java
Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterV3.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterV3.java?rev=1564384&r1=1564383&r2=1564384&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterV3.java (original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterV3.java Tue Feb 4 17:21:32 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);