当为spark master指定local [n1,n2,n3]时,三个参数是什么? [英] When specifying local[n1,n2,n3] for spark master, what are the three parameters?

查看:220
本文介绍了当为spark master指定local [n1,n2,n3]时,三个参数是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于发动星火,我已经看到:

For launching spark, I have seen:

--master local[n1,n2,n3] 

其中n1,n2和n3是整数.

where n1, n2, and n3 are integers.

这些指的是什么?

推荐答案

主规范在

The master specification is parsed in SparkContext.createTaskScheduler. (See the link for the implementation.) The possibilities with local are:

  • local uses 1 thread.
  • local[N] uses N threads.
  • local[*] uses as many threads as there are cores.
  • local[N, M] and local[*, M] are like above, but set the maximal task failures to M. This allows you to enable retries when running locally. (Normally local retries are disabled. Enabling them is useful for testing.)
  • local-cluster[numSlaves, coresPerSlave, memoryPerSlave] starts executors in separate processes as configured, but it does not require running workers and masters. It's a lightweight way to simulate a cluster in unit tests. (See also SPARK-595.)

这篇关于当为spark master指定local [n1,n2,n3]时,三个参数是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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