hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Hadoop Wiki] Update of "Hbase/HowToMigrate" by stack
Date Thu, 23 Jul 2009 20:46:19 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.

The following page has been changed by stack:

  It will disable compression setting all column families to no compression.  Enable manually
post-compression (Rare should be person who has compression enabled -- talk to us if this
is a problem).
+ ==== Preparing for Migration ====
+ You MUST do a few things first before you can begin migration of either hadoop or hbase.
+ ===== Major Compacting all Tables =====
+ Before you begin, you MUST run a major compaction on all tables including .META. table.
 A major compaction compacts all store files in a family together dropping deleted and expired
cells.  Major compaction is necessary because the way deletes work changed in 0.20 hbase.
 Migration will not work without your completing major compaction.  Use the shell to start
up major compactions.  For example, the below cluster has only one table named 'a'.  See how
we run a major_compaction on each:
+ {{{stack@connelly:~/checkouts/hbase/branches/0.19$ ./bin/hbase shell
+ HBase Shell; enter 'help<RETURN>' for list of supported commands.
+ Version: 0.19.4, r781868, Tue Jul 14 11:27:58 PDT 2009
+ hbase(main):001:0> list
+ a                                                                                      
+ 2 row(s) in 0.1251 seconds
+ hbase(main):002:0> major_compact 'a'
+ 0 row(s) in 0.0400 seconds
+ hbase(main):003:0> major_compact '.META.'
+ 0 row(s) in 0.0245 seconds
+ hbase(main):004:0> major_compact '-ROOT-'
+ 0 row(s) in 0.0173 seconds}}}
+ In the above, the compaction took no time.  The case will likely be different for you if
you have big tables.
+ The way to confirm that the major compaction completed is to do a listing of the hbase rootdir
in hdfs.  For each region on the filesystem, each of its stores should have one mapfile only
if major compaction succeeded.  For example, below we list whats under the 'a' table directory
under the hbase rootdir:

View raw message