|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.conf.Configured
org.apache.hadoop.hbase.util.Migrate
public class Migrate
Perform a migration.
HBase keeps a file in hdfs named hbase.version just under the hbase.rootdir.
This file holds the version of the hbase data in the Filesystem. When the
software changes in a manner incompatible with the data in the Filesystem,
it updates its internal version number,
HConstants.FILE_SYSTEM_VERSION
. This wrapper script manages moving
the filesystem across versions until there's a match with current software's
version number. This script will only cross a particular version divide. You may
need to install earlier or later hbase to migrate earlier (or older) versions.
This wrapper script comprises a set of migration steps. Which steps are run depends on the span between the version of the hbase data in the Filesystem and the version of the current softare.
A migration script must accompany any patch that changes data formats.
This script has a 'check' and 'execute' mode. Adding migration steps,
its important to keep this in mind. Testing if migration needs to be run,
be careful not to make presumptions about the current state of the data in
the filesystem. It may have a format from many versions previous with
layout not as expected or keys and values of a format not expected. Tools
such as MetaUtils
may not work as expected when running against
old formats -- or, worse, fail in ways that are hard to figure (One such is
edits made by previous migration steps not being apparent in later migration
steps). The upshot is always verify presumptions migrating.
This script will migrate an hbase 0.18.x only.
Constructor Summary | |
---|---|
Migrate()
default constructor |
|
Migrate(HBaseConfiguration conf)
|
Method Summary | |
---|---|
static void |
main(String[] args)
Main program |
int |
run(String[] args)
|
Methods inherited from class org.apache.hadoop.conf.Configured |
---|
getConf, setConf |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.hadoop.conf.Configurable |
---|
getConf, setConf |
Constructor Detail |
---|
public Migrate()
public Migrate(HBaseConfiguration conf)
conf
- Method Detail |
---|
public int run(String[] args)
run
in interface org.apache.hadoop.util.Tool
public static void main(String[] args)
args
- command line arguments
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |