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 <stack@apache.org> Signed-off-by: Josh Elser <elserj@apache.org> Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
parent
67abffa105
commit
a53356729f
|
@ -21,3 +21,4 @@ linklint/
|
|||
.checkstyle
|
||||
**/.checkstyle
|
||||
.java-version
|
||||
tmp
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue