Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
hbase [2015/08/18 10:03]
steve
hbase [2016/07/01 12:35]
steve
Line 2: Line 2:
  
   * [[Hadoop]]   * [[Hadoop]]
 +  * [[hdfs]]
  
   * [[https://​hbase.apache.org/​book.html|Apache HBase Reference Guide]]   * [[https://​hbase.apache.org/​book.html|Apache HBase Reference Guide]]
Line 61: Line 62:
  
 ==== hbase backups ==== ==== hbase backups ====
 +
 +** Exporting a table **
 +
 +From the docs: "​Export is a utility that will dump the contents of table to HDFS in a sequence file." [[http://​hbase.apache.org/​book.html#​_export|Source]]
 +
 +<​code>​
 +hbase org.apache.hadoop.hbase.mapreduce.Export <​tablename>​ <​outputdir>​ [<​versions>​ [<​starttime>​ [<​endtime>​]]]
 +</​code>​
 +
 +For example, exporting table ''​table_name'':​
 +
 +<​code>​
 +hbase org.apache.hadoop.hbase.mapreduce.Export table_name /​tmp/​table_name
 +</​code>​
 +
 +** Importing a table: **
 +
 +From the docs: "​Import is a utility that will load data that has been exported back into HBase."​ [[http://​hbase.apache.org/​book.html#​_import|Source]]
 +
 +<​code>​
 +hbase -Dhbase.import.version=0.94 org.apache.hadoop.hbase.mapreduce.Import <​tablename>​ <​inputdir>​
 +</​code>​
  
 ==== TTL ==== ==== TTL ====
Line 69: Line 92:
  
 <​code>​ <​code>​
-alter '​table',​ { TTL = 604800 }+alter '​table',​ { TTL =604800 }
 major_compact '​table'​ major_compact '​table'​
 </​code>​ </​code>​