2017-01-31 7 views
0

私がMesosクラスタに対してpysparkシェルを実行しているとします。私はちょうど12のCPUコアを占有したいと思う。メゾスのスパーク:タスクが1つのノードでスケジュールされる

[email protected]:~$ pyspark --master mesos://e3.test:5050 --total-executor-cores 12 

をそして、通常のものになり:だから私はこのようにそれを起動

Python 2.7.13 |Anaconda 2.5.0 (64-bit)| (default, Dec 20 2016, 23:09:15) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2 
Type "help", "copyright", "credits" or "license" for more information. 
Anaconda is brought to you by Continuum Analytics. 
Please check out: http://continuum.io/thanks and https://anaconda.org 
Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties 
17/01/31 08:16:31 INFO SparkContext: Running Spark version 1.6.2 
17/01/31 08:16:31 INFO SecurityManager: Changing view acls to: uu 
17/01/31 08:16:31 INFO SecurityManager: Changing modify acls to: uu 
17/01/31 08:16:31 INFO SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users with view permissions: Set(uu); users with modify permissions: Set(uu) 
17/01/31 08:16:31 INFO Utils: Successfully started service 'sparkDriver' on port 53336. 
17/01/31 08:16:31 INFO Slf4jLogger: Slf4jLogger started 
17/01/31 08:16:32 INFO Remoting: Starting remoting 
17/01/31 08:16:32 INFO Remoting: Remoting started; listening on addresses :[akka.tcp://sparkDriverAc[email protected]:59860] 
17/01/31 08:16:32 INFO Utils: Successfully started service 'sparkDriverActorSystem' on port 59860. 
17/01/31 08:16:32 INFO SparkEnv: Registering MapOutputTracker 
17/01/31 08:16:32 INFO SparkEnv: Registering BlockManagerMaster 
17/01/31 08:16:32 INFO DiskBlockManager: Created local directory at /var/tmp/spark/blockmgr-6b16ff11-b0bc-4a71-82f5-c69a363c8c1a 
17/01/31 08:16:32 INFO MemoryStore: MemoryStore started with capacity 511.1 MB 
17/01/31 08:16:32 INFO SparkEnv: Registering OutputCommitCoordinator 
17/01/31 08:16:32 INFO Utils: Successfully started service 'SparkUI' on port 4040. 
17/01/31 08:16:32 INFO SparkUI: Started SparkUI at http://r4.test:4040 
I0131 08:16:32.582038 24965 sched.cpp:226] Version: 1.1.0 
I0131 08:16:32.586931 24958 sched.cpp:330] New master detected at [email protected]:5050 
I0131 08:16:32.587162 24958 sched.cpp:341] No credentials provided. Attempting to register without authentication 
I0131 08:16:32.596922 24956 sched.cpp:743] Framework registered with 075ef8d0-de21-472d-8198-80805006b93d-0051 
17/01/31 08:16:32 INFO CoarseMesosSchedulerBackend: Registered as framework ID 075ef8d0-de21-472d-8198-80805006b93d-0051 
17/01/31 08:16:32 INFO Utils: Successfully started service 'org.apache.spark.network.netty.NettyBlockTransferService' on port 51135. 
17/01/31 08:16:32 INFO NettyBlockTransferService: Server created on 51135 
17/01/31 08:16:32 INFO BlockManagerMaster: Trying to register BlockManager 
17/01/31 08:16:32 INFO BlockManagerMasterEndpoint: Registering block manager r4.test:51135 with 511.1 MB RAM, BlockManagerId(driver, r4.test, 51135) 
17/01/31 08:16:32 INFO BlockManagerMaster: Registered BlockManager 
17/01/31 08:16:32 INFO CoarseMesosSchedulerBackend: SchedulerBackend is ready for scheduling beginning after reached minRegisteredResourcesRatio: 0.0 
17/01/31 08:16:32 INFO CoarseMesosSchedulerBackend: Mesos task 0 is now TASK_RUNNING 
Welcome to 
     ____    __ 
    /__/__ ___ _____/ /__ 
    _\ \/ _ \/ _ `/ __/ '_/ 
    /__/.__/\_,_/_/ /_/\_\ version 1.6.2 
     /_/ 

Using Python version 2.7.13 (default, Dec 20 2016 23:09:15) 
SparkContext available as sc, HiveContext available as sqlContext. 

は、それが登録された唯一のエグゼキュータで終わる:

>>> 17/01/31 08:16:35 INFO CoarseMesosSchedulerBackend: Registered executor NettyRpcEndpointRef(null) (r5.test:42965) with ID 023af0f2-fc60-4d9d-a3db-301ab34764c9-S3 
17/01/31 08:16:35 INFO BlockManagerMasterEndpoint: Registering block manager r5.test:33239 with 511.1 MB RAM, BlockManagerId(023af0f2-fc60-4d9d-a3db-301ab34764c9-S3, r5.test, 33239) 

全体スパークことを意味しますアプリは1つのノードで実行しようとしています。そして、これは私が望むスケジューリングではありません(主にデータの局所性のためです)。私が期待していたことは、スパークスタンドアロンセットアップのようなものでした。--total-executor-coresは、クラスタ全体にほぼ均等に分散しています。

これを達成する方法はありますか?エグゼキュータ/コア番号に言及している残りのオプションは、影響を与えていないようです(また、スタンドアローンと糸構成のみに関連しています)。

SparkとMesosは、配布作業ではなく1つずつノードを埋めるというこの配置戦略を採用するのはなぜですか?

UPD:docsで言及コンファレンスエントリはどちらか動作しません:

pyspark --master mesos://e3.test:5050 --conf spark.executor.cores=2 --conf spark.cores.max=12 

答えて

0
version 1.6.2 

が問題です。より最近のバージョンでは、Executorごとのコア数をキャッピングするオプションspark.cores.maxがあります。

関連する問題