gpt4 book ai didi

java - 如何修复 Hadoop 警告 : An illegal reflective access operation has occurred error on Ubuntu

转载 作者:可可西里 更新时间:2023-11-01 14:26:26 25 4
gpt4 key购买 nike

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

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

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

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 文件配置

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"

最佳答案

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

基本上有一些名为 sun.security.krb5.Config 的类,它是一些名为 java.security.jgss 的“模块”的一部分。该模块“定义”了它导出的内容(其他人可以从中使用什么)以及导出给谁。这也意味着用简单的英语来说,这不是供公众使用的——不要碰它; hadoop 做得很好,这是他们解决这个问题的一部分。您可以报告此问题或尝试升级 hadoop,这可能已经修复。

关于java - 如何修复 Hadoop 警告 : An illegal reflective access operation has occurred error on Ubuntu,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52155078/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com