目标:将HBase中student表中的数据,通过MR迁移到HDFS的hdfs://hadoop112:9000/user/hadoop/out1路径下。
1. 添加Maven依赖
<dependencies>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-server</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-client</artifactId>
<version>1.3.1</version>
</dependency>
</dependencies>
2. 查看HBase的MapReduce任务的执行
[hadoop@hadoop112 hbase-1.3.1]$ bin/hbase mapredcp
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/module/hbase-1.3.1/lib/slf4j-log4j12-1.7.5.jar!/or

本文档详细介绍了如何使用MapReduce将HBase中的student表数据迁移到HDFS。过程包括添加Maven依赖、配置环境变量、构建Mapper和Driver,并最终打包运行任务。在执行任务前,确保HDFS的目标路径不存在,以免引发错误。
最低0.47元/天 解锁文章
1014

被折叠的 条评论
为什么被折叠?



