Configuring the Switchover Between the Multi-Active Instance Mode and the Multi-Tenant Mode
Scenarios
In a Spark cluster environment, you can seamlessly switch between multi-active instance mode and multi-tenant mode by adjusting the relevant service configuration parameters.
The differences between the multi-active instance mode and the multi-tenant mode are as follows:
- Multi-active instance mode allows multiple ThriftServer services to run concurrently within a cluster. Clients can connect to any available instance at random, enabling high availability for service operations. Even if one or more ThriftServer services in the cluster become unavailable, the client can automatically reconnect to another normal ThriftServer service.
- In multi-tenant mode, JDBCServers are tenant-specific: each tenant is associated with one or more JDBCServers, and each JDBCServer exclusively serves a single tenant. Resource isolation is achieved by configuring separate YARN queues for each tenant. Furthermore, JDBCServers can be launched dynamically based on workload requirements, optimizing resource utilization.
Procedure
- Log in to FusionInsight Manager.
For details, see Accessing FusionInsight Manager.
- Choose Cluster > Services > Spark2x or Spark, click Configurations and then All Configurations, and search for the following parameters and adjust their values.
Table 1 Parameter description Parameter
Description
Example Value
spark.thriftserver.proxy.enabled
Whether to use the multi-tenant mode.
- false: The multi-instance mode is used.
- true: The multi-tenant mode is used.
true
spark.scheduler.allocation.file
Path to the fair scheduler XML file that is shared among multiple tenants and instances.
- If the multi-active instance mode is used, the path is changed to #{conf_dir}/fairscheduler.xml.
- If multi-tenant mode is used, the path is changed to ./__spark_conf__/__hadoop_conf__/fairscheduler.xml.
spark.proxyserver.hash.enabled
Specifies whether to connect to ProxyServer using the Hash algorithm.
- true: The Hash algorithm is used. In multi-tenant mode, this parameter must be set to true.
- false: A random connection is used. In multi-active instance mode, this parameter must be set to false.
After this parameter is modified, you need to download the client again.
true
- After the parameter settings are modified, click Save, perform operations as prompted, and wait until the settings are saved successfully.
- After the Spark server configurations are updated, if Configure Status is Expired, restart the component for the configurations to take effect.
Figure 1 Modifying Spark configurations
On the Spark dashboard page, choose More > Restart Service or Service Rolling Restart, enter the administrator password, and wait until the service restarts.
If you use the Spark client to submit tasks, after the cluster parameter spark.proxyserver.hash.enabled is modified, you need to download the client again for the configuration to take effect. For details, see Using an MRS Client.Components are unavailable during the restart, affecting upper-layer services in the cluster. To minimize the impact, perform this operation during off-peak hours or after confirming that the operation does not have adverse impact.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot