hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anoopsamj...@apache.org
Subject svn commit: r1564385 - /hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterV3.java
Date Tue, 04 Feb 2014 17:22:49 GMT
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);



Mime
View raw message