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
Last revision Both sides next revision
hbase [2015/08/18 10:03]
steve
hbase [2015/08/19 14:50]
steve
Line 61: Line 61:
  
 ==== 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 91:
  
 <​code>​ <​code>​
-alter '​table',​ { TTL = 604800 }+alter '​table',​ { TTL =604800 }
 major_compact '​table'​ major_compact '​table'​
 </​code>​ </​code>​