YARN 上的 Spark 日志在哪里? [英] Where are logs in Spark on YARN?

查看:38
本文介绍了YARN 上的 Spark 日志在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的火花.现在我可以在纱线 (2.0.0-cdh4.2.1) 上运行 spark 0.9.1.但是执行后没有日志.

I'm new to spark. Now I can run spark 0.9.1 on yarn (2.0.0-cdh4.2.1). But there is no log after execution.

以下命令用于运行 spark 示例.但是在历史服务器中找不到正常 MapReduce 作业中的日志.

The following command is used to run a spark example. But logs are not found in the history server as in a normal MapReduce job.

SPARK_JAR=./assembly/target/scala-2.10/spark-assembly-0.9.1-hadoop2.0.0-cdh4.2.1.jar 
./bin/spark-class org.apache.spark.deploy.yarn.Client --jar ./spark-example-1.0.0.jar 
--class SimpleApp --args yarn-standalone  --num-workers 3 --master-memory 1g 
--worker-memory 1g --worker-cores 1

在哪里可以找到日志/标准错误/标准输出?

where can I find the logs/stderr/stdout?

有地方设置配置吗?我确实从控制台找到了一个输出:

Is there someplace to set the configuration? I did find an output from console saying:

14/04/14 18:51:52 信息客户端:ApplicationMaster 的命令:$JAVA_HOME/bin/java -server -Xmx640m -Djava.io.tmpdir=$PWD/tmp org.apache.spark.deploy.yarn.ApplicationMaster --class SimpleApp --jar ./spark-example-1.0.0.jar --args 'yarn-standalone' --worker-memory 1024 --worker-cores 1 --num-workers 3 1> <LOG_DIR>/stdout 2> /stderr

14/04/14 18:51:52 INFO Client: Command for the ApplicationMaster: $JAVA_HOME/bin/java -server -Xmx640m -Djava.io.tmpdir=$PWD/tmp org.apache.spark.deploy.yarn.ApplicationMaster --class SimpleApp --jar ./spark-example-1.0.0.jar --args 'yarn-standalone' --worker-memory 1024 --worker-cores 1 --num-workers 3 1> <LOG_DIR>/stdout 2> <LOG_DIR>/stderr

在这一行中,注意1>$LOG_DIR/stdout 2>$LOG_DIR/stderr

LOG_DIR 在哪里可以设置?

Where can LOG_DIR be set?

推荐答案

关于这个问题的漂亮文章:

Pretty article for this question:

在 YARN 上运行 Spark- 请参阅调试您的应用程序"部分.包含所有必需示例的体面解释.

Running Spark on YARN - see the section "Debugging your Application". Decent explanation with all required examples.

要为 Spark 正确运行历史服务器,您唯一需要遵循的是关闭应用程序中的 Spark 上下文.否则,应用历史服务器不会将您视为 COMPLETE,也不会显示任何内容(尽管历史用户界面可访问但不那么明显).

The only thing you need to follow to get correctly working history server for Spark is to close your Spark context in your application. Otherwise, application history server does not see you as COMPLETE and does not show anything (despite history UI is accessible but not so visible).

这篇关于YARN 上的 Spark 日志在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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