Differences
This shows you the differences between two versions of the page.
| hbase [2016/07/01 18:35] – created - external edit 127.0.0.1 | hbase [2025/07/21 09:32] (current) – removed steve | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== hbase ====== | ||
| - | * [[Hadoop]] | ||
| - | * [[hdfs]] | ||
| - | |||
| - |   * [[https:// | ||
| - |   * [[https:// | ||
| - |   * [[https:// | ||
| - | |||
| - | Start REST server: | ||
| - | |||
| - | < | ||
| - | hbase-daemon.sh start rest | ||
| - | </ | ||
| - | |||
| - | ==== hbase shell ==== | ||
| - | |||
| - | To script stuff through hbase shell, there are two ways. One is to pipe things directly: | ||
| - | |||
| - | < | ||
| - | echo list | hbase shell | ||
| - | </ | ||
| - | |||
| - | And the other is to write a script: | ||
| - | |||
| - | < | ||
| - | echo list > test_script | ||
| - | hbase shell test_script | ||
| - | </ | ||
| - | |||
| - | To save history, add this to '' | ||
| - | |||
| - | < | ||
| - | require ' | ||
| - | IRB.conf[: | ||
| - | IRB.conf[: | ||
| - | Kernel.at_exit do | ||
| - |     IRB.conf[: | ||
| - | i.call | ||
| - | end | ||
| - | end | ||
| - | </ | ||
| - | |||
| - | ** Display status: ** | ||
| - | |||
| - | < | ||
| - | echo status | hbase shell | ||
| - | 5 servers, 0 dead, 2365.2000 average load | ||
| - | </ | ||
| - | |||
| - | ** List tables: ** | ||
| - | |||
| - | < | ||
| - | echo list | hbase shell | ||
| - | </ | ||
| - | |||
| - | ** Describe the table: ** | ||
| - | |||
| - | < | ||
| - | echo " | ||
| - | </ | ||
| - | |||
| - | ==== hbase backups ==== | ||
| - | |||
| - | ** Exporting a table ** | ||
| - | |||
| - | From the docs: " | ||
| - | |||
| - | < | ||
| - | hbase org.apache.hadoop.hbase.mapreduce.Export < | ||
| - | </ | ||
| - | |||
| - | For example, exporting table '' | ||
| - | |||
| - | < | ||
| - | hbase org.apache.hadoop.hbase.mapreduce.Export table_name / | ||
| - | </ | ||
| - | |||
| - | ** Importing a table: ** | ||
| - | |||
| - | From the docs: " | ||
| - | |||
| - | < | ||
| - | hbase -Dhbase.import.version=0.94 org.apache.hadoop.hbase.mapreduce.Import < | ||
| - | </ | ||
| - | |||
| - | ==== TTL ==== | ||
| - | |||
| - | Changing TTL: " | ||
| - | |||
| - | Change the TTL (time-to-live), | ||
| - | |||
| - | < | ||
| - | alter ' | ||
| - | major_compact ' | ||
| - | </ | ||