如何将hbase数据导出到hdfs目录

时间:2015-04-17 04:24:08

标签: hbase

当我尝试通过此命令将hbase表数据导出到hdfs目录时: $ hbase org.apache.hadoop.hbase.mapreduce.Export

在下一行我的工作挂起。

2015-04-16 21:11:49,946 INFO [main] zookeeper.ZooKeeper:客户端环境:java.library.path = / usr / lib / hadoop / lib / native 2015-04-16 21:11:49,946 INFO [main] zookeeper.ZooKeeper:客户端环境:java.io.tmpdir = / tmp 2015-04-16 21:11:49,946 INFO [main] zookeeper.ZooKeeper:客户端环境:java.compiler = 2015-04-16 21:11:49,946 INFO [main] zookeeper.ZooKeeper:客户端环境:os.name = Linux 2015-04-16 21:11:49,946 INFO [main] zookeeper.ZooKeeper:客户端环境:os.arch = amd64 2015-04-16 21:11:49,946 INFO [main] zookeeper.ZooKeeper:客户端环境:os.version = 2.6.32-358.el6.x86_64 2015-04-16 21:11:49,946 INFO [main] zookeeper.ZooKeeper:客户端环境:user.name = cloudera 2015-04-16 21:11:49,946 INFO [main] zookeeper.ZooKeeper:客户端环境:user.home = / home / cloudera 2015-04-16 21:11:49,946 INFO [main] zookeeper.ZooKeeper:客户端环境:user.dir = / home / cloudera 2015-04-16 21:11:49,948 INFO [main] zookeeper.ZooKeeper:启动客户端连接,connectString = localhost:2181 sessionTimeout = 90000 watcher = hconnection-0x720eb0ac,quorum = localhost:2181,baseZNode = / hbase 2015-04-16 21:11:50,004 INFO [main-SendThread(quickstart.cloudera:2181)] zookeeper.ClientCnxn:打开与服务器的套接字连接quickstart.cloudera / 127.0.0.1:2181。不会尝试使用SASL进行身份验证(未知错误) 2015-04-16 21:11:50,011 INFO [main-SendThread(quickstart.cloudera:2181)] zookeeper.ClientCnxn:建立到quickstart.cloudera / 127.0.0.1的套接字连接:2181,启动会话 2015-04-16 21:11:50,027 INFO [main-SendThread(quickstart.cloudera:2181)] zookeeper.ClientCnxn:服务器上的会话建立完成quickstart.cloudera / 127.0.0.1:2181,sessionid = 0x14cc394917b000d,negotiated timeout = 40000 2015-04-16 21:11:50,108 INFO [main] util.RegionSizeCalculator:计算表格的区域大小" TBL_REVENUE_GENERATOR"。

请提供正确的导出数据的方式。

1 个答案:

答案 0 :(得分:0)

HBase的导出工具是一个内置的HBase实用程序,可以轻松地将数据从HBase表导出到HDFS目录中的普通SequenceFiles。

hbase org.apache.hadoop.hbase.mapreduce.Export <tablename> <outputdir>