技术标签: Hadoop. mapreduce. HBase. Kerberos. cloudera-cdh.
我正在编写MapReduce应用程序,以访问CDH集群的HBase数据,启用Kerberos。我的CDH版本为5.9.0,在3个节点上运行,Kerberos版本为1.10.1。现在,我面临着一个问题,希望有人可以提供帮助。
我的代码:
conf.set("hadoop.security.authentication", "Kerberos");
UserGroupInformation.setConfiguration(conf);
UserGroupInformation.loginUserFromKeytab("[email protected]", "jj.keytab");
HTable table = new HTable(conf, "myTable");
Put p = new Put(Bytes.toBytes("myLittleRow"));
p.add(Bytes.toBytes("myColumnFamily"), Bytes.toBytes("someQualifier"),
Bytes.toBytes("Some Value"));
table.put(p);
上面的代码帮助我跑了 本地模式成功 和 java -jar 或者 hadoop -jar。但是当我尝试用一个跑 通过色调oozie工作流程,以下问题发生:
FATAL [main] org.apache.hadoop.hbase.ipc.RpcClientImpl: SASL authentication failed. The most likely cause is missing or invalid credentials. Consider 'kinit'. javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)]
Caused by: GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)
因此,我尝试使用init凭据来获取有效令牌来运行作业
TableMapReduceUtil.initCredentialsForCluster(job,conf);
但问题仍然发生。有人有什么想法吗?
最后我找到了解决方案。在CDH上配置Hue-Ozzie作业很容易与安全的HBase交谈。
你需要做的就是:
hbase-site.xml 到了 job.xml 小路 CDH启用Kerberos,导致namenode和resourcemanager等页面无法访问,访问页面的时候报错 Problem accessing /cluster. Reason 解决方案: 将hdfs/yarn的配置中这个勾选去掉,重启服务即可 ...
1. 垃圾回收优化 1)首先是设置新生代大小的参数,不能过小,过小则导致年轻代过快成为老生代,引起老生代产生内存随便。同样不能过大,过大导致所有的JAVA进程停止时间长。-XX:MaxNewSize=256m-XX:NewSize=256m这两个可以合并成为-Xmn256m这一个配置来完成。 2)其次是设置垃圾回收策略:-XX:+UseParNewGC ...
hadoop在用户权限上做的只是像linux用户级别的安全认证,即对文件的访问权限。对于一些数据安全比较重视的公司是不够的,如果对数据安全有要求,而且是认证方式的,可以使用kerberos,但是并不是很好用,当初阿里巴巴在安全上使用kerberos,后来嫌弃太麻烦就抛弃了,自己开发了一套安全认证系统叫宙斯盾已经开源,有兴趣的可以看看。 今天为大家写的实践已经运用到我们单位的大数据平台。不废话去讲k...
1.文档编写目的 本文档主要讲述如何在启用Kerberos的CDH集群中安装配置及使用Sentry。 内容概述 1.如何安装Sentry服务 2.Hive/Impala/Hue/HDFS服务如何与Sentry集成 3.Sentry测试 测试环境 1.操作系统为CentOS6.5 2.CM和CDH版本为5.11.1 3.采用root用户操作 前置条件 1.CDH集群运行正常 2.集群已启用Kerbe...
1.在集群所有节点添加fayson_r用户 2.创建Kerberos用户fayson_r 3.使用hive用户登录Kerberos 使用beeline连接HiveServer2,创建columnread角色并授权test表s1列的读权限,将columnread角色授权给fayson_r用户组 4.fayson_r用户测试 使用fayson_r登录Kerberos,通过beeline连接HiveSe...
摄像头的8种颜色:橙、黄、绿、紫、灰、蓝、棕、白 分别对应双绞线的8种颜色:橙白、橙、绿白、蓝、蓝白、绿、棕白、棕 简化一点用网线的568B顺序分别对接就是:橙白(接橙色)、橙(接黄色)、绿白(接绿色)、蓝(接紫色)、蓝白(接灰色)、绿(接蓝色)、棕白(接棕色)、棕(接白色) 568A标准:绿白,绿,橙白,蓝,蓝白,橙,棕白,棕 橙绿蓝棕 排列好,先4-6交叉,再1-3、2-6 RJ-4...
静态资源访问失效,是应为其地址无法自动添加项目路径 以下model.html 以下index.html 以下index_1.html 以下controller.java 结果...
配置日志并测试 进入到hive目录修改日志文件名称 在hive目录下创建logs目录 修改hive-log4j.properties配置文件hive.log.dir 把hive.log.dir=${java.io.tmpdir}/${user.name} 修改为 /opt/modules/hive-0.13.1/logs 退出hive 进入hive进行测试 进入 日志文件产生 在hive控制台打印...
最近用beeline替代hive cli,发现之前在hive-site.xml 的 Hive 客户端高级配置代码段(安全阀)的配置项,beeline居然不生效,如下图所示,而hive cli是生效的 查看了执行机器上/etc/hive/conf/hive-site.xml文件,发现配置确实是修改了,一直以为是环境变量的原因,找了几个小时,网上也没相关解释,最后在hive-site.xml 的 Hi...
在座的各位应该都知道,Git 作为居家必备、团队协作之利器,打从 Linus Torvalds 发布这款工具时起,便一直受到各路开发者的喜爱。 不过,尽管如此, Git 里面太多干巴巴,看起来非常枯燥无味的命令行,一旦几天没用,就很容易就忘得一干二净,希望 能出一些与 Git 相关的辅助教程,或者比较有趣、对小白比较友好的学习方式。 emmm.. 尽可能满足大家的一切要求啦。 几天前,偶然在 Tw...
I'm trying to suppress IE's default handling of Ctrl+O. I've got a onKeyDown handler which get's called, but even though I call event.cancelBubble and return false, the default File|Open command still...
Recently i've picked up Oracle SQL, Right now i'm trying to write a function that later will be used in a view to generate a list. but for now im stuck on the function itself... The function makes use...
I have a problem regarding of creating table. I want to do this: But I got this: I have tried everything and I'm realize that I have problem with the looping. I've tried to put @endforeach before <...
I have a WPF 3D application (C# .NET 4.0) that has a lot of 3D geometries. Now I need to color these geometries by applying a texture. The source for the texture is one large .PNG file like the follow...
after filling the inputs in the view and clicking the submit button, the records gets saved just fine if I use Firefox. The same goes for IE if I'm quick enough. But when I wait 10 seconds, the POST d...