Configure a Hadoop Cluster
Parallel MATLAB® code that contains tall
(MATLAB) arrays and mapreduce
(MATLAB)
functions can be submitted to the Hadoop cluster from suitably configured MATLAB
clients.
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.
Cluster Configuration
Integrate MATLAB Parallel Server™ with your cluster infrastructure. For instructions, see Install MATLAB Parallel Server for Other Third-Party Schedulers.
If your cluster requires Kerberos authentication, ensure your MATLAB Parallel Server installations have been configured correctly. For instructions, see Kerberos Authentication.
Client Configuration
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
(Parallel Computing Toolbox) object using the following
statements.
setenv('HADOOP_HOME', '/path/to/hadoop/install') cluster = parallel.cluster.Hadoop;
Use mapreducer
(MATLAB) 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 Cluster (Parallel Computing Toolbox).
Kerberos Authentication
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
${MATLAB_ROOT}/sys/java/jre/${ARCH}/jre/lib/security/java.security
.Change the line
to#crypto.policy=unlimited
crypto.policy=unlimited
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
local_policy.jar
andUS_export_policy.jar
in the folder${MATLABROOT}/sys/java/jre/${ARCH}/jre/lib/security
with the downloaded versions.
Hadoop Version Support
MATLAB
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
| Migrate MATLAB
|
See Also
parallel.cluster.Hadoop
(Parallel Computing Toolbox)
Related Topics
- Install MATLAB Parallel Server for Other Third-Party Schedulers
- Use Tall Arrays on a Spark Cluster (Parallel Computing Toolbox)
- Run mapreduce on a Hadoop Cluster (Parallel Computing Toolbox)
- Read and Analyze Hadoop Sequence File (MATLAB)