You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Controls whether HBase will check for stream capabilities (hflush/hsync).
107
-
108
-
Disable this if you intend to run on LocalFileSystem, denoted by a rootdir
109
-
with the 'file://' scheme, but be mindful of the NOTE below.
110
-
111
-
WARNING: Setting this to false blinds you to potential data loss and
112
-
inconsistent system state in the event of process and/or node failures. If
113
-
HBase is complaining of an inability to use hsync or hflush it's most
114
-
likely not a false positive.
115
-
</description>
103
+
<name>hbase.tmp.dir</name>
104
+
<value>tmp</value>
116
105
</property>
117
106
</configuration>
118
107
----
119
108
====
120
109
+
121
-
You do not need to create the HBase data directory.
122
-
HBase will do this for you. If you create the directory,
123
-
HBase will attempt to do a migration, which is not what you want.
110
+
You do not need to create the HBase _tmp_ directory; HBase will do this for you.
124
111
+
125
-
NOTE: The _hbase.rootdir_ in the above example points to a directory
126
-
in the _local filesystem_. The 'file://' prefix is how we denote local
127
-
filesystem. You should take the WARNING present in the configuration example
128
-
to heart. In standalone mode HBase makes use of the local filesystem abstraction
129
-
from the Apache Hadoop project. That abstraction doesn't provide the durability
130
-
promises that HBase needs to operate safely. This is fine for local development
131
-
and testing use cases where the cost of cluster failure is well contained. It is
132
-
not appropriate for production deployments; eventually you will lose data.
133
-
134
-
To home HBase on an existing instance of HDFS, set the _hbase.rootdir_ to point at a
135
-
directory up on your instance: e.g. _hdfs://namenode.example.org:8020/hbase_.
136
-
For more on this variant, see the section below on Standalone HBase over HDFS.
112
+
NOTE: When unconfigured, HBase uses <<hbase.tmp.dir,`hbase.tmp.dir`>> as a starting point for many
113
+
important configurations. Notable among them are <<hbase.rootdir,`hbase.rootdir`>>, the path under
114
+
which HBase stores its data. You can specify values for this configuration directly, as you'll see
115
+
in the subsequent sections.
116
+
+
117
+
NOTE: In this example, HBase is running on Hadoop's `LocalFileSystem`. That abstraction doesn't
118
+
provide the durability promises that HBase needs to operate safely. This is most likely acceptable
119
+
for local development and testing use cases. It is not appropriate for production deployments;
120
+
eventually you will lose data. Instead, ensure your production deployment sets
121
+
<<hbase.rootdir,`hbase.rootdir`>> to a durable `FileSystem` implementation.
137
122
138
123
. The _bin/start-hbase.sh_ script is provided as a convenient way to start HBase.
139
124
Issue the command, and if all goes well, a message is logged to standard output showing that HBase started successfully.
@@ -308,26 +293,21 @@ In the next sections we give a quick overview of other modes of hbase deploy.
308
293
[[quickstart_pseudo]]
309
294
=== Pseudo-Distributed Local Install
310
295
311
-
After working your way through <<quickstart,quickstart>> standalone mode,
312
-
you can re-configure HBase to run in pseudo-distributed mode.
313
-
Pseudo-distributed mode means that HBase still runs completely on a single host,
314
-
but each HBase daemon (HMaster, HRegionServer, and ZooKeeper) runs as a separate process:
315
-
in standalone mode all daemons ran in one jvm process/instance.
316
-
By default, unless you configure the `hbase.rootdir` property as described in
317
-
<<quickstart,quickstart>>, your data is still stored in _/tmp/_.
318
-
In this walk-through, we store your data in HDFS instead, assuming you have HDFS available.
319
-
You can skip the HDFS configuration to continue storing your data in the local filesystem.
296
+
After working your way through the <<quickstart,quickstart>> using standalone mode, you can
297
+
re-configure HBase to run in pseudo-distributed mode. Pseudo-distributed mode means that HBase
298
+
still runs completely on a single host, but each HBase daemon (HMaster, HRegionServer, and
299
+
ZooKeeper) runs as a separate process. Previously in <<quickstart,standalone mode>>, all these
300
+
daemons ran in a single jvm process, and your data was stored under
301
+
<<hbase.tmp.dir,`hbase.tmp.dir`>>. In this walk-through, your data will be stored in in HDFS
302
+
instead, assuming you have HDFS available. This is optional; you can skip the HDFS configuration
303
+
to continue storing your data in the local filesystem.
320
304
321
305
.Hadoop Configuration
322
-
[NOTE]
323
-
====
324
-
This procedure assumes that you have configured Hadoop and HDFS on your local system and/or a remote
325
-
system, and that they are running and available. It also assumes you are using Hadoop 2.
306
+
NOTE: This procedure assumes that you have configured Hadoop and HDFS on your local system and/or a
307
+
remote system, and that they are running and available. It also assumes you are using Hadoop 2.
326
308
The guide on
327
309
link:https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-common/SingleCluster.html[Setting up a Single Node Cluster]
328
310
in the Hadoop documentation is a good starting point.
329
-
====
330
-
331
311
332
312
. Stop HBase if it is running.
333
313
+
@@ -348,8 +328,8 @@ First, add the following property which directs HBase to run in distributed mode
348
328
</property>
349
329
----
350
330
+
351
-
Next, change the `hbase.rootdir` from the local filesystem to the address of your HDFS instance, using the `hdfs:////` URI syntax.
352
-
In this example, HDFS is running on the localhost at port 8020. Be sure to either remove the entry for `hbase.unsafe.stream.capability.enforce` or set it to true.
331
+
Next, add a configuration for `hbase.rootdir` so that it points to the address of your HDFS instance, using the `hdfs:////` URI syntax.
332
+
In this example, HDFS is running on the localhost at port 8020.
353
333
+
354
334
[source,xml]
355
335
----
@@ -360,10 +340,10 @@ In this example, HDFS is running on the localhost at port 8020. Be sure to eithe
360
340
</property>
361
341
----
362
342
+
363
-
You do not need to create the directory in HDFS.
364
-
HBase will do this for you.
343
+
You do not need to create the directory in HDFS; HBase will do this for you.
365
344
If you create the directory, HBase will attempt to do a migration, which is not what you want.
366
-
345
+
+
346
+
Finally, remove the configuration for `hbase.tmp.dir`.
367
347
. Start HBase.
368
348
+
369
349
Use the _bin/start-hbase.sh_ command to start HBase.
0 commit comments