Configure Spark History Servers (Parcel)
If you’re using Application Profiler to fetch history data for Spark apps, you can customize the connection timeout value and/or add a second Spark History Server for monitoring.
On This Page
Configure Connection Timeout for Spark History Server
In environments with extreme network latency or frequent connectivity issues, it can be helpful to increase the connection timeout setting for REST requests that fetch Spark app data from the Spark History Server. By default, Pepperdata waits five (5) seconds before timing out, but you can change this value to suit your environment.
- Configure History Fetcher Retries. To ensure that application history is successfully fetched from the applicable component (MapReduce Job History Server for MapReduce apps, or Spark History Server for Spark apps), the Pepperdata Supervisor uses a two-phase approach. Phase 1 makes the initial attempt to fetch the history, and if it fails, makes up to three retries. Phase 2 adds an additional try and by default up to five retries, with the interval between retries increased by a factor of five every time. You can customize the number of retries for each phase, which might be required for environments with extreme network latency or frequent connectivity issues.
Add the environment variable for the connection timeout,
Use Cloudera Manager to add the environment variable for the connection timeout to the Pepperdata > Configuration > Pepperdata Service Environment Advanced Configuration Snippet (Safety Valve) template.
Add the environment variable in the following format. Be sure to replace the default connection timeout (5 seconds) with your custom value.
Restart the Pepperdata services.
In Cloudera Manager, select the Restart action for the Pepperdata service.
Read from Two Spark History Servers
If you have two Spark History Servers (typically because you’re in the midst of upgrading to a newer version, and you’re temporarily running both versions during the migration), you can configure Pepperdata to read from both of them. Perform the configuration for the second Spark History Server on any host other than the MapReduce Job History Server host (which is the primary history fetcher host for Pepperdata). On the chosen host, add environment variables for the second Spark History Server to the Pepperdata configuration.
Complete the regular Pepperdata installation steps; see Installing Pepperdata.
Complete the regular Pepperdata configuration steps, including the configuration of the first Spark History Server; see Configuring Pepperdata.
Start up Pepperdata; see Starting Up Pepperdata.
Choose any host other than the MapReduce Job History Server host, which is the primary history fetcher host for Pepperdata.
Add the configuration for the second Spark History Server.
Use Cloudera Manager to add the following snippet to the Pepperdata > Configuration > PepAgent Environment Advanced Configuration Snippet (Safety Valve) template.
your-server=urlis the fully-qualified URL of the second Spark History Server.
Disambiguate the two Spark History Servers.
In Cloudera Manager, navigate to Pepperdata > Instances.
Click an instance of PepAgent that is not a job history host, and click Configuration.
An alert appears that recommends that you make configuration changes on the service configuration page instead.
DO NOT click
Dismiss the alert by clicking the × in the upper-right corner of the alert.
Add the following snippet to the PepAgent Environment Advanced Configuration Snippet (Safety Valve) template.
PD_BYPASS_JOBHISTORY_IS_LOCAL_CHECK=1 PD_DO_JOBHISTORY_STARTUP_CHECK=0 PD_JOBHISTORY_FETCHERS="spark"
Click Save Changes.
In Cloudera Manager, select the Restart action for the PepAgent service.