cancel
Showing results for 
Search instead for 
Did you mean: 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results for 
Search instead for 
Did you mean: 

Increase cores for Spark History Server

VMeghraj
New Contributor II

By default SHS uses spark.history.fs.numReplayThreads = 25% of avaliable cores (Number of threads that will be used by history server to process event logs)

How can we increase the number of cores for Spark History Server ?

1 REPLY 1

Setting the value in % will throw an error (spark.history.fs.numReplayThreads=50%)

We need to provide int as an value spark.history.fs.numReplayThreads=25

Stack Trace :

Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.apache.spark.deploy.history.HistoryServer$.main(HistoryServer.scala:337)
at org.apache.spark.deploy.history.HistoryServer.main(HistoryServer.scala)
Caused by: java.lang.IllegalArgumentException: spark.history.fs.numReplayThreads should be int, but was 50%
at org.apache.spark.internal.config.ConfigHelpers$.toNumber(ConfigBuilder.scala:35)
at org.apache.spark.internal.config.ConfigBuilder.$anonfun$intConf$1(ConfigBuilder.scala:232)
at org.apache.spark.internal.config.ConfigBuilder.$anonfun$intConf$1$adapted(ConfigBuilder.scala:232)
at scala.Option.map(Option.scala:230)
at org.apache.spark.internal.config.ConfigEntryWithDefaultFunction.readFrom(ConfigEntry.scala:173)
at org.apache.spark.SparkConf.get(SparkConf.scala:261)
at org.apache.spark.deploy.history.FsHistoryProvider.<init>(FsHistoryProvider.scala:105)
at org.apache.spark.deploy.history.FsHistoryProvider.<init>(FsHistoryProvider.scala:90)

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now