You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ch...@apache.org on 2017/09/22 17:49:53 UTC

hbase git commit: HBASE-18847 Remove unneeded synchronized block from HFileWriterV2 warning in branch-1.2

Repository: hbase
Updated Branches:
  refs/heads/branch-1.2 2ea2cee60 -> 5e240625b


HBASE-18847 Remove unneeded synchronized block from HFileWriterV2 warning in branch-1.2

Signed-off-by: Chia-Ping Tsai <ch...@gmail.com>


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

Branch: refs/heads/branch-1.2
Commit: 5e240625bfd4f9f22579bd949c755a934b03dcbf
Parents: 2ea2cee
Author: Rich Howarth <ri...@rhowarth.org>
Authored: Thu Sep 21 17:31:32 2017 -0400
Committer: Chia-Ping Tsai <ch...@gmail.com>
Committed: Sat Sep 23 01:46:18 2017 +0800

----------------------------------------------------------------------
 .../apache/hadoop/hbase/io/hfile/HFileWriterV2.java  | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/5e240625/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 0eedffa..a85fde9 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
@@ -274,13 +274,14 @@ public class HFileWriterV2 extends AbstractHFileWriter {
       newBlock();
     }
 
-    synchronized (HFileWriterV2.class) {
-      if (WARN_CELL_WITH_TAGS && 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.");
-        WARN_CELL_WITH_TAGS = false;
-      }
+    // Reads/writes from/to WARN_CELL_WITH_TAGS aren't thread-safe, but this
+    // is of limited concern because it should only result in limited extra logging
+
+    if (WARN_CELL_WITH_TAGS && 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.");
+      WARN_CELL_WITH_TAGS = false;
     }
 
     fsBlockWriter.write(cell);