Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/logging/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache spark Azure HD Insight-Thread UI不会突然在stderr上显示日志_Apache Spark_Logging_Log4j_Yarn_Azure Hdinsight - Fatal编程技术网

Apache spark Azure HD Insight-Thread UI不会突然在stderr上显示日志

Apache spark Azure HD Insight-Thread UI不会突然在stderr上显示日志,apache-spark,logging,log4j,yarn,azure-hdinsight,Apache Spark,Logging,Log4j,Yarn,Azure Hdinsight,我们过去常常通过进入logs-->stderr来查看应用程序日志,它用来显示SPARK信息日志以及我们自己的信息日志,在过去1个月中,它只显示以下内容: SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/usr/hdp/4.1.0.26/spark2/jars/slf4j-log4j12-1.7.16.jar!/org/slf4j/impl/StaticLoggerBind

我们过去常常通过进入logs-->stderr来查看应用程序日志,它用来显示SPARK信息日志以及我们自己的信息日志,在过去1个月中,它只显示以下内容:

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hdp/4.1.0.26/spark2/jars/slf4j-log4j12-1.7.16.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/4.1.0.26/hadoop/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
我们使用Azure HDI已有2年多了,因为在过去3-4周,Thread UI没有在stderr上打印日志。我们尝试了所有选项,例如使用旧HDI版本、使用旧jar文件、研究log4j属性,但没有任何效果。我们猜测log4j的输出会被重定向到其他地方。但我们从未更改过任何配置属性,也不知道要更改什么。我们还尝试使用Livy和spark submit提交作业,同样的问题

但是我们应该提到,如果我们使用“println()”,它可以在stderr上工作和打印


感谢您提供的任何线索/帮助。

您可以尝试以下几点:

  • 检查
    Spark History server
    在Ambari中是否正常运行
  • 在Ambari=>Spark2中 找到下面的配置键,并将控制台添加到具有以下命令的任何位置—
    Dlog4jspark.root.logger=INFO,RFA,Anonymizer
    Dlog4jspark.root.logger=INFO,console,RFA,Anonymizer
您可以在以下属性中找到它
spark.executor.extraJavaOptions
content
spark.driver.extraJavaOptions

  • 您是否能够使用

     yarn logs -applicationId <appid> --appOwner <userid>
    
    纱线原木-应用程序ID

    • 您需要检查您是否仍面临与其他用户的问题
    • 尝试使用部署模式作为客户端的小型Spark作业,因为它的集群模式要求每个节点中都有log4j
    • 作为一种解决方法,您可以使用定制的log4j.Link

    感谢您提供详细信息。是的,我们已经尝试了其中的大多数,您无法使用THEAN命令查看日志。由于某种原因,日志基本上没有被重定向。似乎Azure已经改变了一些东西&HDI中有些东西被破坏了,我们向他们提出了支持票。非常感谢。
       yarn logs -applicationId <appid>