Installing Flink
This topic includes instructions for using package managers to download and install, or remove Flink from the DEP.
Before Installing Flink
Consider the following points before you install the mapr-flink
package:
- You must install the
mapr-flinkpackage on a cluster node that runs Flink CLI tools. - You can install
mapr-flinkpackage on a single node. YARN installs the Flink on other nodes of the cluster that has node manager running..NOTETo run Flink as a YARN application, you must installmapr-flinkpackage on a host that hasmapr-hadoop-clientinstalled.
Install Flink
On the node you want to install Flink, run the following commands as
root user or with sudo:
- Ubuntu
apt install mapr-flink- RHEL
yum install mapr-flink
Remove Flink
Flink does not stop any running jobs or clusters upon package removal. To stop any running Flink processes before package removal, do the steps that follow:
- If you want to save any running job's state and use it in future,
stop the job and create a savepoint,
run:
/opt/mapr/flink/flink-<version>/bin/flink stop <job_id> --savepointPath <savepoints_directory>Save the given in the output savepoint path (you may want to use after reinstallation).
OR
If you want to cancel the job without saving the job's state, run:/opt/mapr/flink/flink-<version>/bin/flink cancel <job_id> - To stop any running Flink cluster (YARN application),
run:
echo "stop" | /opt/mapr/flink/flink-<version>/bin/yarn-session.sh -id <application_id>
Post Installation Steps
To configure Flink, see Configuring Flink.