Skip to content

Commit

Permalink
&& => ||
Browse files Browse the repository at this point in the history
  • Loading branch information
wangfei committed May 10, 2014
1 parent cf38bcf commit 43621bd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,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) {
if (memoryFraction > 1 || memoryFraction < 0) {
throw new IllegalArgumentException("spark.storage.memoryFraction should be between 0 and 1.")
}
(Runtime.getRuntime.maxMemory * memoryFraction).toLong
Expand Down

0 comments on commit 43621bd

Please sign in to comment.