大数据工具篇

上传人:cn****1 文档编号:564606932 上传时间:2022-11-25 格式:DOCX 页数:53 大小:85.45KB
返回 下载 相关 举报
大数据工具篇_第1页
第1页 / 共53页
大数据工具篇_第2页
第2页 / 共53页
大数据工具篇_第3页
第3页 / 共53页
大数据工具篇_第4页
第4页 / 共53页
大数据工具篇_第5页
第5页 / 共53页
点击查看更多>>
资源描述

《大数据工具篇》由会员分享,可在线阅读,更多相关《大数据工具篇(53页珍藏版)》请在金锄头文库上搜索。

1、大数据工具篇之Hive与HBase整合完整教程一、引言最近的一次培训,用户特意提到 Hadoop 环境下 HDFS 中存储的文件如何才能导入 到 HBase ,关于这部分基于 HBase Java API 的写入方式,之前曾经有过技术文 章共享,本文就不再说明。本文基于Hive执行HDFS批量向HBase导入数据,讲 解 Hive 与 HBase 的整合 问题。这方面的文章已经很多,但是由于版本差异,可 操作性不大,本文采用的版本均基于以下版本说明中的版本。二、版本说明序号 软件 版本1 Hive 0.10.02 HBase 0.94.03 Hadoop 1.0.1三、配置指南cp conf/

2、hive-default.xml.template hive-default.xmlcp conf/hive-default.xml.template hive-site.xml基于 hive-default.xml.template 进行拷贝复制的 hive-site.xml 文件有问题, 主要集中在description标签不配对的情况,需要根据错误提 示进行修改,修改完成后的配置文件 如下所示:E1 231920 2122 23 24 252627 28 29 mapred.reduce.tasks30 -131 The default number of reduce tasks pe

3、r job. Typically set32 to a prime close to the number of available hosts. Ignored when33 mapred.job.tracker is local. Hadoop set this to 1 by default, whereas hive uses -1 as its default value.34 By setting this property to -1, Hive will automatically figure out what should be the number of reducers

4、.35 36 3738 39 hive.exec.reducers.bytes.per.reducer40 100000000041 size per reducer.The default is 1G, i.e if the input size is 10G, it will use 10 reducers.42 4344 45 hive.exec.reducers.max46 99947 max number of reducers will be used. If the one48 specified in the configuration parameter mapred.red

5、uce.tasks is49 negative, hive will use this one as the max number of reducers when50 automatically determine number of reducers.51 5253 54 hive.cli.print.header55 false56 Whether to print the names of the columns in query output.57 5859 60 hive.cli.print.current.db61 false62 Whether to include the c

6、urrent database in the hive prompt.63 6465 66 hive.cli.prompt67 hive68 Command line prompt configuration value. Other hiveconf can be used in69 this configuration value. Variable substitution will onlybe invoked at the hive70 cli startup.71 7273 74 hive.exec.scratchdir75 /tmp/hive-$user.name76 Scrat

7、ch space for Hive jobs77 7879 80 hive.exec.local.scratchdir81 /tmp/$user.name82 Local scratch space for Hive jobs83 8485 86 hive.test.mode87 false88 whether hive is running in test mode. If yes, it turns on sampling and prefixes the output tablename89 9091 92 hive.test.mode.prefix93 test_94 if hive is running in test mode, prefixes the output table by this string95 9697 98 99 100 101 102 103 104 105 hive.test.mode.samplefreq106 32107 if hive is running in test mode and table is not bucketed, sampling frequency108 109110 111 hive.test.mode.nosamplelist112 valu

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 学术论文 > 其它学术论文

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号