Main Content

并行.Cluster.Hadoop.

Mapreducer,MapReduce和Tall阵列的Hadoop集群

Description

并行.Cluster.Hadoop对象提供对配置Mapreducer,MapReduce和高阵列的群集的访问。

特性

并行.Cluster.Hadoop对象具有以下属性。

Property Description
含量径 文件夹添加到MATLAB搜索工人的路径,指定为字符向量,字符串或字符串数​​组,或字符向量的单元格数组
AttachedFiles 发送给工人的文件和文件夹mapreduce呼叫,指定为字符向量,字符串或字符串数​​组,或字符向量的单元格数组
autoattachfiles. Specifies whether automatically attach files
clustermatlabroot. Specifies path to MATLAB for workers to use
hadoopconfigurationfile. Application configuration file to be given to Hadoop
HadoopInstallFolder Hadoop的安装位置在本地机器上
hadoopproperties. 要提供给Hadoop的名称值属性对地图
许可证号 与在线许可一起使用的许可证号码
RequiresOnlineLicensing 指定群集是否使用在线许可
SparkInstallFolder. Installation location of Spark on the local machine
发光 名称值属性对的映射可供出口

卸载对工人的计算时,还必须在工人上使用客户端上计算所需的任何文件。默认情况下,客户端尝试自动检测和附加此类文件。要关闭自动检测,请设置autoattachfiles.属性为假。如果自动检测找不到所有文件,或者如果将文件从客户端发送到工人慢,请使用以下属性。

  • 如果这不是accessibl文件在一个文件夹e on the workers, set theAttachedFiles财产。群集将从客户端指定的每个文件复制到工人。

  • 如果文件位于工人上可访问的文件夹中,则可以设置含量径property instead. Use the含量径属性为每个工作人员的matlab添加路径®搜索路径并避免将文件从客户端不必要地复制到工人。

hadoopproperties.允许您覆盖Hadoop的配置属性。查看Hadoop中的属性列表®documentation.

SparkInstallFolder.默认设置为SPARK_HOME环境变量。这是对Hadoop上的高阵列评估所必需的(但不是用于MapReduce)。有关正确配置的群集,您只需设置安装文件夹。

发光允许您覆盖Spark的配置属性。查看火花中的属性列表®documentation.

Help

有关进一步的帮助,请键入:

help parallel.cluster.Hadoop

Specify Memory Properties

Spark Enabled Hadoop集群将限制限制为多少内存。您必须调整这些限制以支持您的工作流程。金宝app

Size of Data to Gather

这amount of data gathered to the client is limited by the Spark properties:

  • spark.driver.memory

  • Spark.executor.memory.

这amount of data to gather from a single Spark task must fit in these properties. A single Spark task processes one block of data from HDFS, which is 128 MB of data by default. If you gather a tall array containing most of the original data, you must ensure these properties are set to fit.

如果这些属性设置得太小,则会看到以下内容。

使用高/聚集(50线)脱离内存时出错;无法从火花中收集大小300米的分区。调整Spark属性的值Spark.Driver.memory和Spark.executor.memory以适合此分区。
这error message also specifies the property settings you need.

Adjust the properties either in the default settings of the cluster or directly in MATLAB. To adjust the properties in MATLAB, add name-value pairs to the发光集群的属性。例如:

cluster = parallel.cluster.hadoop;cluster.sparkProperties('spark.driver.memory')='2048M';cluster.sparkProperties('spark.executor.memory')='2048M';Mapreducer(群集);

为matlab工作者指定工作内存大小

MATLAB工人的工作存储器的数量受到SPARK属性的限制:

  • spark.yarn.executor.moryoverhead.

By default, this is set to 2.5 GB. You typically need to increase this if you useArrayfun.cellfun或自定义数据存储,以一次生成大量数据。如果您遇到丢失或崩溃的火花执行器流程,建议增加此项。

您可以在群集的默认设置或直接在MATLAB中调整这些属性。要调整MATLAB中的属性,请将名称值对添加到群集中的SparkProperties属性。例如:

cluster = parallel.cluster.hadoop;cluster.sparkProperties('spark.yarn.executor.memoryOverhead')='4096M';Mapreducer(群集);

也可以看看

parallel.Clusterparallel.Pool

Introduced in R2014b