我在一台计算机上安装了Apache Spark 1.6.1独立集群,其规格如下:
我在conf / spark-env.sh
中使用以下设置export SPARK_WORKER_MEMORY
export SPARK_WORKER_INSTANCES
export SPARK_WORKER_CORES
export SPARK_WORKER_DIR
由于机器有一个4芯处理器,我认为可能的配置可能是:
export SPARK_WORKER_MEMORY = 14g
export SPARK_WORKER_INSTANCES = 1
export SPARK_WORKER_CORES = 1
export SPARK_WORKER_DIR =/local_drive/sparkdata
export SPARK_WORKER_MEMORY = 14g
export SPARK_WORKER_INSTANCES = 1
export SPARK_WORKER_CORES = 2
export SPARK_WORKER_DIR =/local_drive/sparkdata
export SPARK_WORKER_MEMORY = 14g
export SPARK_WORKER_INSTANCES = 1
export SPARK_WORKER_CORES = 3
export SPARK_WORKER_DIR =/local_drive/sparkdata
export SPARK_WORKER_MEMORY = 14g
export SPARK_WORKER_INSTANCES = 1
export SPARK_WORKER_CORES = 4
export SPARK_WORKER_DIR =/local_drive/sparkdata
export SPARK_WORKER_MEMORY = 7g
export SPARK_WORKER_INSTANCES = 2
export SPARK_WORKER_CORES = 1
export SPARK_WORKER_DIR =/local_drive/sparkdata
export SPARK_WORKER_MEMORY = 7g
export SPARK_WORKER_INSTANCES = 2
export SPARK_WORKER_CORES = 2
export SPARK_WORKER_DIR =/local_drive/sparkdata
export SPARK_WORKER_MEMORY = 4.5g
export SPARK_WORKER_INSTANCES = 3
export SPARK_WORKER_CORES = 1
export SPARK_WORKER_DIR =/local_drive/sparkdata
export SPARK_WORKER_MEMORY = 3.5g
export SPARK_WORKER_INSTANCES = 4
export SPARK_WORKER_CORES = 1
export SPARK_WORKER_DIR =/local_drive/sparkdata
所以我的想法是:
问题是我测试了配置,并设置:
export SPARK_WORKER_MEMORY = 14g
export SPARK_WORKER_INSTANCES = 3
export SPARK_WORKER_CORES = 40
export SPARK_WORKER_DIR =/local_drive/sparkdata
我收到任何错误,再加上Apache Web界面显示“40核心”。怎么了?那么我真的可以拥有多少个工人核心和工人实例?
提前致谢。