Hive 0.11 升级踩坑记——HiveServer2的imperson问题
2014-01-19 18:15
246 查看
前阶段线上在做Hive升级(CDH4.2.0 Hive 0.10——> Apache Hive0.11 with our patches)和Shark上线踩了不少坑,先来说一个Hiveserver的问题.beeline进入后随便执行一个查询就会报错:USERxxx don’t have write privilegs under /tmp/hive-hdfs不对啊,已经启用了impersonation怎么还会去hdfs下的scratchdir写入临时文件呢?查看下代码发现原来CDH4.2的Hive的impersonation和hive0.11在这处的判断行为是不同的:Hive0.11 apache:只有在启用kerberos才使用hive-xxx作为scratchdir否则使用hiveserver的start user的scratchdir
workaround也简单,就是把/tmp/hive-hdfs改成777就好了=。=坑爹啊
if ( cliService.getHiveConf().getVar(ConfVars.HIVE_SERVER2_AUTHENTICATION) .equals(HiveAuthFactory.AuthTypes.KERBEROS.toString()) && cliService.getHiveConf(). getBoolVar(ConfVars.HIVE_SERVER2_ENABLE_DOAS) ) { String delegationTokenStr = null; try { delegationTokenStr = cliService.getDelegationTokenFromMetaStore(userName); } catch (UnsupportedOperationException e) { // The delegation token is not applicable in the given deployment mode } sessionHandle = cliService.openSessionWithImpersonation(userName, req.getPassword(), req.getConfiguration(), delegationTokenStr); } else { sessionHandle = cliService.openSession(userName, req.getPassword(), req.getConfiguration()); }Cloudera4.2.0的Hive0.10是只要启用了impersonation就使用独自的scratchdir...
if (cliService.getHiveConf(). getBoolVar(HiveConf.ConfVars.HIVE_SERVER2_KERBEROS_IMPERSONATION)) { String delegationTokenStr = null; try { delegationTokenStr = cliService.getDelegationTokenFromMetaStore(userName); } catch (UnsupportedOperationException e) { // The delegation token is not applicable in the given deployment mode } sessionHandle = cliService.openSessionWithImpersonation(userName, req.getPassword(), req.getConfiguration(), delegationTokenStr); } else { sessionHandle = cliService.openSession(userName, req.getPassword(), req.getConfiguration()); }并且这个作为一个Hiveserver的bug在0.13被修复:https://issues.apache.org/jira/browse/HIVE-5486
workaround也简单,就是把/tmp/hive-hdfs改成777就好了=。=坑爹啊
相关文章推荐
- hive升级到0.11的问题
- 关于hive升级到0.11的版本问题2
- hive0.11升级问题小结
- hive升级至0.11 partition schemal问题
- Hive版本升级问题及注意事项
- hive升级到0.11的体验
- hive 0.11升级hive 0.13
- CDH 中组件升级问题(hive为例)
- hive0.11升级碰到的坑
- 升级hive-0.11后报java.lang.InstantiationException: org.antlr.runtime.CommonToke
- hive0.11的hive server实现kerberos认证和impersonation中碰到的问题
- 升级到Flask 0.11要注意的问题
- hive升级遇到的几个小问题
- AIX Oracle RAC 升级到10.2.0.4.0要特别注意的问题
- asp.net项目在用 VS 升级的问题 ReportView
- CocoaPods 升级问题(一)
- Android OTA升级原理和流程分析(二)---update.zip差分包问题的解决
- mybatis-spring从1.1升级到1.2所带来的dao层级的编写问题
- 升级Oracle 11g自带Application Express到3.1问题
- ubuntu升级导致virtualbox不能启动问题