[Hive_add_8] Hive 常用参数配置


0. 说明

  记录 Hive 常用参数的配置


1. 设置本地模式

  让 Hive 自动使用 Hadoop 的本地模式运行作业,提升处理性能

  适合小文件,一般用于测试

set hive.exec.mode.local.auto=true;

  输入文件大小低于此值会进入本地模式

SET hive.exec.mode.local.auto.inputbytes.max=500000000;

  输入文件个数低于此值会进入本地模式

SET hive.exec.mode.local.auto.input.files.max=5;

2. 在 Hive 中执行 Shell 语句和 HDFS 语句

  在 Hive 命令行执行 Shell 语句

!sh ls -l /home/centos

  在 Hive 命令行执行 HDFS 语句

dfs -ls / ;

3. 在命令行下设置 reduce 的个数 

set mapreduce.job.reduces=2;

原文地址:https://www.cnblogs.com/share23/p/10225417.html