首页 > 其他 > 详细

operation note for "spark with yarn"

时间:2014-02-27 22:49:21      阅读:504      评论:0      收藏:0      [点我收藏+]

(1) operation history:

SPARK_HADOOP_VERSION=2.2.0 SPARK_YARN=true sbt/sbt assembly

按官方教程失败,但去掉红色的部分,很容易编译成功,这条指令会带来什么?

修改为

SPARK_HADOOP_VERSION=2.2.0 SPARK_YARN=true sbt/sbt clean compile package assembly

正常通过

(2) 启动测试程序

bubuko.com,布布扣
export YARN_CONF_DIR=$HADOOP_HOME
SPARK_JAR=./assembly/target/scala-2.9.3/spark-assembly-0.8.1-incubating-hadoop2.2.0.jar ./spark-class org.apache.spark.deploy.yarn.Client     --jar ./examples/target/scala-2.9.3/spark-examples-assembly-0.8.1-incubating.jar     --class org.apache.spark.examples.JavaSparkPi     --args yarn-standalone     --num-workers 3     --master-memory 2g     --worker-memory 2g     --worker-cores 1
bubuko.com,布布扣

(3) 结果

bubuko.com,布布扣
...
14/02/27 00:25:57 INFO yarn.Client: Application report from ASM: 
         application identifier: application_1393415612957_0004
         appId: 4
         clientToAMToken: null
         appDiagnostics: 
         appMasterHost: 192.168.0.105
         appQueue: default
         appMasterRpcPort: 0
         appStartTime: 1393431898882
         yarnAppState: RUNNING
         distributedFinalState: UNDEFINED
         appTrackingUrl: jiahuili-MBP.local:8088/proxy/application_1393415612957_0004/
         appUser: admin
14/02/27 00:25:58 INFO yarn.Client: Application report from ASM: 
         application identifier: application_1393415612957_0004
         appId: 4
         clientToAMToken: null
         appDiagnostics: 
         appMasterHost: 192.168.0.105
         appQueue: default
         appMasterRpcPort: 0
         appStartTime: 1393431898882
         yarnAppState: FINISHED
         distributedFinalState: SUCCEEDED
         appTrackingUrl: jiahuili-MBP.local:8088/proxy/application_1393415612957_0004/A
         appUser: admin
bubuko.com,布布扣

 check http://localhost:8088/cluster/ for task details

Ref:

(1) http://spark.incubator.apache.org/docs/latest/running-on-yarn.html

(2) http://blog.csdn.net/macyang/article/details/17632645    -- about yarn

(3) http://dongxicheng.org/framework-on-yarn/build-spark-on-hadoop-2-yarn/

operation note for "spark with yarn",布布扣,bubuko.com

operation note for "spark with yarn"

原文:http://www.cnblogs.com/enyun/p/3570357.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!