面对Kerberos启用的HDP 2.6集群中的Storm HDFS Bolt问题

时间:2017-05-25 09:32:28

标签: hadoop apache-kafka apache-storm kerberos hadoop-streaming

我在HDP 2.6群集中启用了Kerberos Security,在启用Kerberos之前安装了Kafka和Storm服务。

我正在运行的拓扑有kafka-spout,后跟hdfs-bolt。因此,使用内置的Kafka Spout摄取来自特定Kafka主题的CSV数据,然后使用内置的HDFS Bolt传输到HDFS目录。

我正面临一个错误: 未启用SIMPLE身份验证。可用:[TOKEN,KERBEROS]

代码:

Map<String, Object> map = new HashMap<String,Object>();
    map.put("hdfs.keytab.file","/etc/security/keytabs/storm.headless.keytab");
    map.put("hdfs.kerberos.principal","storm-hdp26ks@VSS.COM");
    Config conf = new Config();
    conf.put("hdfs.config", map);
    conf.put(HdfsSecurityUtil.STORM_KEYTAB_FILE_KEY,"/etc/security/keytabs/storm.headless.keytab");
    conf.put(HdfsSecurityUtil.STORM_USER_NAME_KEY,"storm-hdp26ks@VSS.COM");
    conf.setNumWorkers(1);

    HdfsBolt hdfsbolt = new HdfsBolt()
            .withFsUrl(hdfsUrl)
            .withFileNameFormat(fileNameFormat).withRecordFormat(recordFormat)
            .withRotationPolicy(rotationPolicy).withSyncPolicy(syncPolicy).withConfigKey("hdfs.config");

StormSubmitter.submitTopology(topologyName, conf, builder.createTopology());

错误:

Thread-7-hdfs-bolt-executor[3 3] [ERROR]
org.apache.hadoop.security.AccessControlException: 
SIMPLE authentication is not enabled.  Available:[TOKEN, KERBEROS]

如果我需要对storm-hdfs连接器执行任何其他步骤/配置相关更改以使用Kerberos,请告诉我。

0 个答案:

没有答案