1.研究mapreduce测试
(1)本地模式:local model,所有任务,都是运行在一个进程里面的,
开发测试,IDEA点击右键运行
(2)集群模式:Yarn,每个task(map 和reduce )都各自运行在一个JVM中,每个任务都是一个进程。
2.hive运行模式的介绍
目的:为了hive CLi中方便测试,采取设置hive运行模式
set hive.exec.mode.local.auto=true;
如果设置为true,hive框架会自动根据需要处理的数据大小,去决定是否跑本地模式。
默认情况是跟你就Block大小去决定。
处理的数据<128Mb或者MapTask个数< 5个,本地
3.设置方式
(1)hive Cli设置(仅仅本次会话有效)
set hive.exec.mode.local.auto=true;
(2)hive-site.xml配置文件中
所有会话,所有程序都生效
(2.1)使用外部工具连接Linux 找到hive/conf下的hive-default.xml.template
<property>
<name>hive.exec.mode.local.auto</name>
<value>ture</value>
<description>Let Hive determine whether to run in local mode automatically</description>
</property>
(2.2)搜索auto ,找到以下配置将其复制到conf目录下 hive-site.xml文件中(如果没有文件则创建一个并将下列代码写到文件中)
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
具体配置
</configuration>