Skip to content

Commit

Permalink
throw IllegalArgumentException
Browse files Browse the repository at this point in the history
  • Loading branch information
wangfei committed May 10, 2014
1 parent dff1f0f commit 14d18ac
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1046,7 +1046,7 @@ private[spark] object BlockManager extends Logging {
def getMaxMemory(conf: SparkConf): Long = {
val memoryFraction = conf.getDouble("spark.storage.memoryFraction", 0.6)
if (memoryFraction > 1 && memoryFraction < 0) {
throw new Exception("spark.storage.memoryFraction should be between 0 and 1.")
throw new IllegalArgumentException("spark.storage.memoryFraction should be between 0 and 1.")
}
(Runtime.getRuntime.maxMemory * memoryFraction).toLong
}
Expand Down

0 comments on commit 14d18ac

Please sign in to comment.