You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by nd...@apache.org on 2020/05/14 21:36:04 UTC

[hbase] branch branch-1 updated (59a48fc -> a533567)

This is an automated email from the ASF dual-hosted git repository.

ndimiduk pushed a change to branch branch-1
in repository https://gitbox.apache.org/repos/asf/hbase.git.


    from 59a48fc  HBASE-24355 Fix typos in the HStore#compact annotation (#1699)
     new 67abffa  Revert "HBASE-24086 Disable output stream capability enforcement when running on LocalFileSystem"
     new a533567  HBASE-24271 Set values in `conf/hbase-site.xml` that enable running on `LocalFileSystem` out of the box

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitignore                                         |  1 +
 conf/hbase-site.xml                                | 34 ++++++++++++++++++++--
 .../apache/hadoop/hbase/util/CommonFSUtils.java    | 10 -------
 3 files changed, 33 insertions(+), 12 deletions(-)


[hbase] 02/02: HBASE-24271 Set values in `conf/hbase-site.xml` that enable running on `LocalFileSystem` out of the box

Posted by nd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ndimiduk pushed a commit to branch branch-1
in repository https://gitbox.apache.org/repos/asf/hbase.git

commit a53356729fce74ea71d9457471310000baf8ae5a
Author: Nick Dimiduk <nd...@apache.org>
AuthorDate: Mon Apr 27 13:07:29 2020 -0700

    HBASE-24271 Set values in `conf/hbase-site.xml` that enable running on `LocalFileSystem` out of the box
    
    Simplify the new user experience shipping a configuration that enables
    a fresh checkout or tarball distribution to run in standalone mode
    without direct user configuration. This change restores the behavior
    we had when running on Hadoop 2.8 and earlier.
    
    Patch for master includes an update to the book. This change will be
    omitted when backporting to earlier branches.
    
    Signed-off-by: stack <st...@apache.org>
    Signed-off-by: Josh Elser <el...@apache.org>
    Signed-off-by: Duo Zhang <zh...@apache.org>
---
 .gitignore                                         |  1 +
 conf/hbase-site.xml                                | 34 ++++++++++++++++++++--
 .../apache/hadoop/hbase/util/CommonFSUtils.java    |  4 +--
 3 files changed, 35 insertions(+), 4 deletions(-)

diff --git a/.gitignore b/.gitignore
index 0ae87d9..0b883e0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,3 +21,4 @@ linklint/
 .checkstyle
 **/.checkstyle
 .java-version
+tmp
diff --git a/conf/hbase-site.xml b/conf/hbase-site.xml
index c516ac7..20c62f7 100644
--- a/conf/hbase-site.xml
+++ b/conf/hbase-site.xml
@@ -1,8 +1,7 @@
 <?xml version="1.0"?>
 <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
 <!--
-/**
- *
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -21,4 +20,35 @@
  */
 -->
 <configuration>
+  <!--
+    The following properties are set for running HBase as a single process on a
+    developer workstation. With this configuration, HBase is running in
+    "stand-alone" mode and without a distributed file system. In this mode, and
+    without further configuration, HBase and ZooKeeper data are stored on the
+    local filesystem, in a path under the value configured for `hbase.tmp.dir`.
+    This value is overridden from its default value of `/tmp` because many
+    systems clean `/tmp` on a regular basis. Instead, it points to a path within
+    this HBase installation directory.
+
+    Running against the `LocalFileSystem`, as opposed to a distributed
+    filesystem, runs the risk of data integrity issues and data loss. Normally
+    HBase will refuse to run in such an environment. Setting
+    `hbase.unsafe.stream.capability.enforce` to `false` overrides this behavior,
+    permitting operation. This configuration is for the developer workstation
+    only and __should not be used in production!__
+
+    See also https://hbase.apache.org/book.html#standalone_dist
+  -->
+  <property>
+    <name>hbase.cluster.distributed</name>
+    <value>false</value>
+  </property>
+  <property>
+    <name>hbase.tmp.dir</name>
+    <value>./tmp</value>
+  </property>
+  <property>
+    <name>hbase.unsafe.stream.capability.enforce</name>
+    <value>false</value>
+  </property>
 </configuration>
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java
index ef6d489..1225d19 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java
@@ -1,4 +1,4 @@
-/**
+/*
  *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -346,7 +346,7 @@ public abstract class CommonFSUtils {
   public static FileSystem getWALFileSystem(final Configuration c) throws IOException {
     Path p = getWALRootDir(c);
     FileSystem fs = p.getFileSystem(c);
-    // hadoop-core does fs caching, so need to propogate this if set
+    // hadoop-core does fs caching, so need to propagate this if set
     String enforceStreamCapability = c.get(UNSAFE_STREAM_CAPABILITY_ENFORCE);
     if (enforceStreamCapability != null) {
       fs.getConf().set(UNSAFE_STREAM_CAPABILITY_ENFORCE, enforceStreamCapability);


[hbase] 01/02: Revert "HBASE-24086 Disable output stream capability enforcement when running on LocalFileSystem"

Posted by nd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ndimiduk pushed a commit to branch branch-1
in repository https://gitbox.apache.org/repos/asf/hbase.git

commit 67abffa10554b07ab3093aca93f44576c4cb21fe
Author: Nick Dimiduk <nd...@apache.org>
AuthorDate: Thu May 14 14:24:42 2020 -0700

    Revert "HBASE-24086 Disable output stream capability enforcement when running on LocalFileSystem"
    
    This reverts commit 03d73f151b26dd35cd9d0d36bc22a9bc9a077188.
---
 .../java/org/apache/hadoop/hbase/util/CommonFSUtils.java   | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java
index 77615db..ef6d489 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java
@@ -1,4 +1,4 @@
-/*
+/**
  *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -39,7 +39,6 @@ import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FSDataOutputStream;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.FileSystem;
-import org.apache.hadoop.fs.LocalFileSystem;
 import org.apache.hadoop.fs.LocatedFileStatus;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.fs.PathFilter;
@@ -347,20 +346,11 @@ public abstract class CommonFSUtils {
   public static FileSystem getWALFileSystem(final Configuration c) throws IOException {
     Path p = getWALRootDir(c);
     FileSystem fs = p.getFileSystem(c);
-    // hadoop-core does fs caching, so need to propagate this if set
+    // hadoop-core does fs caching, so need to propogate this if set
     String enforceStreamCapability = c.get(UNSAFE_STREAM_CAPABILITY_ENFORCE);
     if (enforceStreamCapability != null) {
       fs.getConf().set(UNSAFE_STREAM_CAPABILITY_ENFORCE, enforceStreamCapability);
     }
-    if (fs instanceof LocalFileSystem) {
-      // running on LocalFileSystem, which does not support the required capabilities `HSYNC`
-      // and `HFLUSH`. disable enforcement.
-      final boolean value = false;
-      LOG.warn("Cannot enforce durability guarantees while running on " + fs.getUri()
-        + ". Setting " + UNSAFE_STREAM_CAPABILITY_ENFORCE + "=" + value
-        + " for this FileSystem.");
-      fs.getConf().setBoolean(UNSAFE_STREAM_CAPABILITY_ENFORCE, value);
-    }
     return fs;
   }