大数据技术-HBase:使用CopyTable在线备份HBase表数据
来源:互联网 发布:淘宝网旺旺在哪里 编辑:程序博客网 时间:2024/04/28 02:20
CopyTable是hbase提供的一个很有用的备份工具。主要可以用于集群内部表备份,远程集群备份,表数据增量备份,部分结构数据部分等。其依赖于hadoop mapreduce,使用标准的hbase scan读接口和put写接口。
使用之前,请务必先在集群中创建好需要写入的目标表tableDst,不然会报错,同时注意对于在备份期间新写入的数据无法保证都进行复制到目标表中。
Usage: CopyTable [general options] [--starttime=X] [--endtime=Y] [--new.name=NEW] [--peer.adr=ADR] <tablename>
Options:
rs.class hbase.regionserver.class of the peer cluster
specify if different from current cluster
rs.impl hbase.regionserver.impl of the peer cluster
startrow the start row
stoprow the stop row
starttime beginning of the time range (unixtime in millis)
without endtime means from starttime to forever
endtime end of the time range. Ignored if no starttime specified.
versions number of cell versions to copy
new.name new table's name
peer.adr Address of the peer cluster given in the format
hbase.zookeeer.quorum:hbase.zookeeper.client.port:zookeeper.znode.parent
families comma-separated list of families to copy
To copy from cf1 to cf2, give sourceCfName:destCfName.
To keep the same name, just give "cfName"
all.cells also copy delete markers and deleted cells
Args:
tablename Name of the table to copy
Examples:
To copy 'TestTable' to a cluster that uses replication for a 1 hour window:
$ bin/hbase org.apache.hadoop.hbase.mapreduce.CopyTable --starttime=1265875194289 --endtime=1265878794289 --peer.adr=server1,server2,server3:2181:/hbase --families=myOldCf:myNewCf,cf2,cf3 TestTable
For performance consider the following general options:
-Dhbase.client.scanner.caching=100
-Dmapred.map.tasks.speculative.execution=false
- 大数据技术-HBase:使用CopyTable在线备份HBase表数据
- 使用CopyTable同步HBase数据
- 使用CopyTable工具方法在线备份HBase表
- HBase在线数据备份
- HBase在线数据备份
- HBase的数据备份容灾迁移方案:Distcp,CopyTable,Export/Import,Snapshot,Replication
- 大数据技术-HBase:HBase简介
- 大数据技术-HBase:HBase写入路径
- 大数据技术-HBase:HBase IO HFile
- 大数据技术之Hbase
- 【HBase运维系列】集群间的数据拷贝-copytable
- HBase备份之ExportSnapshot或CopyTable
- HBase 数据备份
- HBase数据备份
- 大数据技术-HBase:HBase 日志划分详解
- 大数据技术-HBase:HBase并发版本控制MVCC
- 大数据技术-HBase:MSLAB介绍
- 大数据技术-HBase:优化hadoop Xceivers
- VS2010下安装boost库
- 344A - Magnets
- Java 序列化的高级认识
- 了解ASP.NET MVC几种ActionResult的本质:EmptyResult & ContentResult
- less学习之编译方法(koala使用说明)
- 大数据技术-HBase:使用CopyTable在线备份HBase表数据
- Redis学习手册(持久化)
- SpringMVC全局文件上传类型限制【终极解决方案】
- Hessian实现Webservice
- Java基础--定时任务Timer
- vs2010:First-chance exception
- 各种杂七咋八的整理
- QT下Json解析方案比较
- LeetCode算法题之Plus One