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 2016/06/17 18:39:25 UTC

hbase git commit: HBASE-14730 region server needs to log warnings when there are attributes configured for cells with hfile v2 (huaxiang sun)

Repository: hbase
Updated Branches:
  refs/heads/branch-1 d4a842948 -> 1f37cdfb4


HBASE-14730 region server needs to log warnings when there are attributes configured for cells with hfile v2 (huaxiang sun)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/1f37cdfb
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/1f37cdfb
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/1f37cdfb

Branch: refs/heads/branch-1
Commit: 1f37cdfb4b970649d30a6ff41f00c7cf0b46aabc
Parents: d4a8429
Author: Matteo Bertozzi <ma...@cloudera.com>
Authored: Thu Dec 17 09:31:04 2015 -0800
Committer: Mikhail Antonov <an...@apache.org>
Committed: Fri Jun 17 11:26:53 2016 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/io/hfile/HFileWriterV2.java   | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/1f37cdfb/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterV2.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterV2.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterV2.java
index 4c8092f..47e7952 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterV2.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterV2.java
@@ -88,6 +88,9 @@ public class HFileWriterV2 extends AbstractHFileWriter {
 
   protected long maxMemstoreTS = 0;
 
+  /** warn on cell with tags */
+  private static boolean warnCellWithTags = true;
+
   static class WriterFactoryV2 extends HFile.WriterFactory {
     WriterFactoryV2(Configuration conf, CacheConfig cacheConf) {
       super(conf, cacheConf);
@@ -267,6 +270,13 @@ public class HFileWriterV2 extends AbstractHFileWriter {
       newBlock();
     }
 
+    if (warnCellWithTags && getFileContext().isIncludesTags()) {
+      LOG.warn("A minimum HFile version of " + HFile.MIN_FORMAT_VERSION_WITH_TAGS
+          + " is required to support cell attributes/tags. Consider setting "
+          + HFile.FORMAT_VERSION_KEY + " accordingly.");
+      warnCellWithTags = false;
+    }
+
     fsBlockWriter.write(cell);
 
     totalKeyLength += CellUtil.estimatedSerializedSizeOfKey(cell);