We can use the following steps to associate Spark with Mesos:
First, configure the sparkle driver program to associate with Mesos.
The Spark paired bundle must be in the area open by Mesos.
After that, install Apache Spark in a similar area as Apache Mesos and design the property "spark.mesos.executor.home" to point to the area where it is introduced.