<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 495,comments - 227,trackbacks - 0
    http://www.cnblogs.com/luogankun/p/4191796.html

    今天在測試spark-sql運行在yarn上的過程中,無意間從日志中發現了一個問題:

    spark-sql --master yarn
    復制代碼
    14/12/29 15:23:17 INFO Client: Requesting a new application from cluster with 1 NodeManagers 14/12/29 15:23:17 INFO Client: Verifying our application has not requested more than the maximum memory capability of the cluster (8192 MB per container) 14/12/29 15:23:17 INFO Client: Will allocate AM container, with 896 MB memory including 384 MB overhead 14/12/29 15:23:17 INFO Client: Setting up container launch context for our AM 14/12/29 15:23:17 INFO Client: Preparing resources for our AM container 14/12/29 15:23:17 INFO Client: Uploading resource file:/home/spark/software/source/compile/deploy_spark/assembly/target/scala-2.10/spark-assembly-1.3.0-SNAPSHOT-hadoop2.3.0-cdh5.0.0.jar -> hdfs://hadoop000:8020/user/spark/.sparkStaging/application_1416381870014_0093/spark-assembly-1.3.0-SNAPSHOT-hadoop2.3.0-cdh5.0.0.jar 14/12/29 15:23:18 INFO Client: Setting up the launch environment for our AM container
    復制代碼

    再開啟一個spark-sql命令行,從日志中再次發現:

    復制代碼
    14/12/29 15:24:03 INFO Client: Requesting a new application from cluster with 1 NodeManagers 14/12/29 15:24:03 INFO Client: Verifying our application has not requested more than the maximum memory capability of the cluster (8192 MB per container) 14/12/29 15:24:03 INFO Client: Will allocate AM container, with 896 MB memory including 384 MB overhead 14/12/29 15:24:03 INFO Client: Setting up container launch context for our AM 14/12/29 15:24:03 INFO Client: Preparing resources for our AM container 14/12/29 15:24:03 INFO Client: Uploading resource file:/home/spark/software/source/compile/deploy_spark/assembly/target/scala-2.10/spark-assembly-1.3.0-SNAPSHOT-hadoop2.3.0-cdh5.0.0.jar -> hdfs://hadoop000:8020/user/spark/.sparkStaging/application_1416381870014_0094/spark-assembly-1.3.0-SNAPSHOT-hadoop2.3.0-cdh5.0.0.jar 14/12/29 15:24:05 INFO Client: Setting up the launch environment for our AM container
    復制代碼

    然后查看HDFS上的文件:

    hadoop fs -ls hdfs://hadoop000:8020/user/spark/.sparkStaging/
    drwx------   - spark supergroup          0 2014-12-29 15:23 hdfs://hadoop000:8020/user/spark/.sparkStaging/application_1416381870014_0093 drwx------   - spark supergroup          0 2014-12-29 15:24 hdfs://hadoop000:8020/user/spark/.sparkStaging/application_1416381870014_0094

    每個Application都會上傳一個spark-assembly-x.x.x-SNAPSHOT-hadoopx.x.x-cdhx.x.x.jar的jar包,影響HDFS的性能以及占用HDFS的空間。

     

    在Spark文檔(http://spark.apache.org/docs/latest/running-on-yarn.html)中發現spark.yarn.jar屬性,將spark-assembly-xxxxx.jar存放在hdfs://hadoop000:8020/spark_lib/下

    在spark-defaults.conf添加屬性配置:

    spark.yarn.jar hdfs://hadoop000:8020/spark_lib/spark-assembly-1.3.0-SNAPSHOT-hadoop2.3.0-cdh5.0.0.jar

    再次啟動spark-sql --master yarn觀察日志:

    復制代碼
    14/12/29 15:39:02 INFO Client: Requesting a new application from cluster with 1 NodeManagers 14/12/29 15:39:02 INFO Client: Verifying our application has not requested more than the maximum memory capability of the cluster (8192 MB per container) 14/12/29 15:39:02 INFO Client: Will allocate AM container, with 896 MB memory including 384 MB overhead 14/12/29 15:39:02 INFO Client: Setting up container launch context for our AM 14/12/29 15:39:02 INFO Client: Preparing resources for our AM container 14/12/29 15:39:02 INFO Client: Source and destination file systems are the same. Not copying hdfs://hadoop000:8020/spark_lib/spark-assembly-1.3.0-SNAPSHOT-hadoop2.3.0-cdh5.0.0.jar 14/12/29 15:39:02 INFO Client: Setting up the launch environment for our AM container
    復制代碼

    觀察HDFS上文件

    hadoop fs -ls hdfs://hadoop000:8020/user/spark/.sparkStaging/application_1416381870014_0097

    該Application對應的目錄下沒有spark-assembly-xxxxx.jar了,從而節省assembly包上傳的過程以及HDFS空間占用。

     

    我在測試過程中遇到了類似如下的錯誤:

    Application application_xxxxxxxxx_yyyy failed 2 times due to AM Container for application_xxxxxxxxx_yyyy 

    exited with exitCode: -1000 due to: java.io.FileNotFoundException: File /tmp/hadoop-spark/nm-local-dir/filecache does not exist

    在/tmp/hadoop-spark/nm-local-dir路徑下創建filecache文件夾即可解決報錯問題。

    posted on 2016-05-26 14:11 SIMONE 閱讀(1077) 評論(0)  編輯  收藏 所屬分類: spark

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 亚洲国产精品婷婷久久| 国产av无码专区亚洲国产精品| 久久久久久久尹人综合网亚洲 | 久久夜色精品国产噜噜噜亚洲AV| 一级特黄录像视频免费| 亚洲熟女乱综合一区二区| 久青草国产免费观看| 亚洲日韩中文字幕日韩在线| 免费精品视频在线| 久久亚洲色一区二区三区| 中国一级特黄的片子免费 | 又爽又高潮的BB视频免费看 | 久久精品视频免费播放| 亚洲大片在线观看| 久草免费在线观看视频| 精品亚洲成在人线AV无码| 日韩视频免费一区二区三区| 成人精品综合免费视频| 亚洲精品字幕在线观看| 久久久久成人精品免费播放动漫| 亚洲美女激情视频| 欧洲美熟女乱又伦免费视频| 国产亚洲美女精品久久久久| 亚洲永久精品ww47| 91视频免费网址| 欧美日韩亚洲精品| 中文字幕亚洲乱码熟女一区二区| 无码av免费一区二区三区| 中文字幕在线日亚洲9| 亚洲AV成人潮喷综合网| 日韩免费电影网址| 亚洲成av人在线观看网站| 中文字幕亚洲激情| 免费黄色福利视频| 黄页网站在线免费观看| 亚洲av女电影网| 国产精品色午夜视频免费看| 成人片黄网站色大片免费观看cn| 亚洲精品午夜在线观看| 亚洲第一区精品观看| 2021国内精品久久久久精免费|