To configure the client to run MATLAB code on the cluster, you must already be able to submit to the cluster from the intended client machine. The client machine must have a Hadoop® installation that can access the cluster outside of MATLAB.
Many Hadoop distributions do not support direct access of Linux® based clusters from Windows® clients. Users of Windows clients typically need to set up a Linux gateway node that can be accessed from the Windows client via SSH or VNC. The cluster can then be accessed from this gateway node.
Integrate MATLAB Parallel Server™ with your cluster infrastructure. For instructions, see Integrate MATLAB with Third-Party Schedulers.
If your cluster requires Kerberos authentication, ensure your MATLAB Parallel Server installations have been configured correctly. For instructions, see Kerberos Authentication.
Ensure your client can access the Hadoop cluster outside MATLAB.
Ensure your client MATLAB installation has been configured for Kerberos authentication if your cluster requires it. For instructions, see Kerberos Authentication.
To access the cluster from within MATLAB, set up a
parallel.cluster.Hadoop object using the following
setenv('HADOOP_HOME', '/path/to/hadoop/install') cluster = parallel.cluster.Hadoop;
mapreducer to specify
mapreduce to run
on the Hadoop cluster object.
For examples of how to run parallel MATLAB code on your Hadoop cluster, see Run mapreduce on a Hadoop Cluster (Parallel Computing Toolbox) and Use Tall Arrays on a Spark Enabled Hadoop Cluster (Parallel Computing Toolbox).
If the cluster uses Kerberos authentication that requires the Oracle® Java® Cryptography Extension, you must configure all installations of MATLAB and MATLAB Parallel Server. If you are using Hortonworks® or Cloudera® distributions, it is likely that you need to complete these configuration steps.
The configuration instructions are the same for client and worker MATLAB installations.
Starting in R2018b, configure your MATLAB installation by enabling the appropriate security policy in the Java installation.
In the MATLAB Editor, open the file
Change the line
For previous releases, you must download additional security files from Oracle.
Download the Oracle Java Cryptography Extension zip file from the Oracle Java SE page.
Unzip the downloaded zip file into a temporary folder.
Replace the files
US_export_policy.jar in the folder
with the downloaded versions.
mapreduce is supported on Hadoop 2.x clusters. Note that
support for Hadoop 1.x clusters has been removed.
MATLAB tall arrays are supported on Spark® enabled Hadoop 2.x clusters. You can use tall arrays on Spark enabled Hadoop clusters supporting all architectures for the client, while supporting Linux and Mac architectures for the cluster. This includes cross-platform support.
|Functionality||Result||Use Instead||Compatibility Considerations|
|Support for running MATLAB
||Errors||Use clusters that have Hadoop 2.x installed to run MATLAB