FAILED: ParseException line 1:0 character '#' not supported here

楔子

hive 使用.hiverc配置出现错误 FAILED: ParseException line 1:0 character '#' not supported here

.hiverc

hive执行是配置参数文件 ,经过测试 ,注释  用`--` 来代替 `# `。每个配置之后加上 `;`
--在命令行中显示当前数据库名
set hive.cli.print.current.db=true; 
--查询出来的结果显示列的名称
set hive.cli.print.header=true;
--启用桶表
set hive.enforce.bucketing=true;
--压缩hive的中间结果
set hive.exec.compress.intermediate=true;
--对map端输出的内容使用BZip2编码/解码器
set mapred.map.output.compression.codec=org.apache.hadoop.io.compress.BZip2Codec;
--压缩hive的输出
set hive.exec.compress.output=true;
-- 对hive中的MR输出内容使用BZip2编码/解码器
set mapred.output.compression.codec=org.apache.hadoop.io.compress.BZip2Codec;
-- 让hive尽量尝试local模式查询而不是mapred方式
set hive.exec.mode.local.auto=true;
 

文件存放路径

1 用户目录下

2 /etc/hive/conf

放在此目录,所有用户都生效

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值