如何修复Hadoop警告:在Ubuntu上发生了非法的反射访问操作错误 [英] How to fix Hadoop WARNING: An illegal reflective access operation has occurred error on Ubuntu

查看:159
本文介绍了如何修复Hadoop警告:在Ubuntu上发生了非法的反射访问操作错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经成功安装了Java openjdk version "10.0.2"Hadoop 2.9.0.所有进程都运行良好

I have installed Java openjdk version "10.0.2"and Hadoop 2.9.0 successfully. All processes are running well

hadoopusr@amalendu:~$ jps
19888 NameNode
20388 DataNode
20898 NodeManager
20343 SecondaryNameNode
20539 ResourceManager
21118 Jps

但是,每当我尝试执行类似hdfs dfs -ls /的任何命令时,都会收到此警告

But when ever i am trying to execute any command like hdfs dfs -ls / getting this warnings

hadoopusr@amalendu:~$ hdfs dfs -ls /
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.hadoop.security.authentication.util.KerberosUtil (file:/usr/local/hadoop/share/hadoop/common/lib/hadoop-auth-2.9.0.jar) to method sun.security.krb5.Config.getInstance()
WARNING: Please consider reporting this to the maintainers of org.apache.hadoop.security.authentication.util.KerberosUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
18/09/04 00:29:24 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

请帮助解决此问题. 这是我的〜/.bashrc文件配置

Please help how to fix this. This is my ~/.bashrc file configuration

export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
export HADOOP_HOME=/usr/local/hadoop
export PATH=$PATH:$HADOOP_HOME/bin
export PATH=$PATH:$HADOOP_HOME/sbin
export HADOOP_MAPRED_HOME=$HADOOP_HOME
export HADOOP_COMMON_HOME=$HADOOP_HOME
export HADOOP_HDFS_HOME=$HADOOP_HOME
export YARN_HOME=$HADOOP_HOME
export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native
export HADOOP_OPTS="-Djava.library.path=$HADOOP_HOME/lib"

推荐答案

对于这些警告,您无能为力,这与拼图项目和强封装有关.

There is nothing you can do about these warnings, this is related to jigsaw project and strong(er) encapsulation.

基本上,有一个名为sun.security.krb5.Config的类,它是某些名为java.security.jgss的模块"的一部分.该模块定义"了它输出的内容(其他人可以从中使用什么)以及向谁输出.这也用普通的英语表示这不是供公众使用的-请勿触摸它; hadoop做得很好,这是他们解决此问题的努力的一部分.您可以报告此问题或尝试升级hadoop,可能这已经解决了.

Basically there is some class called sun.security.krb5.Config that is part of some "module" called java.security.jgss. This module "defines" what it exports (what others can use out of it) and to whom. This also means in plain english that this is not for the public usage - don't touch it; well hadoop did, it's part of their effort to fix this. You can report this or try to upgrade hadoop, may be this is already fixed.

这篇关于如何修复Hadoop警告:在Ubuntu上发生了非法的反射访问操作错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆