Skip to content

Commit

Permalink
[SPARK-2140] Updating heap memory calculation for YARN stable and alpha.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Cope committed Sep 4, 2014
1 parent 00362da commit 52b4e45
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,7 @@ class Client(clientArgs: ClientArguments, hadoopConf: Configuration, spConf: Spa
}

def calculateAMMemory(newApp: GetNewApplicationResponse): Int = {
val minResMemory = newApp.getMinimumResourceCapability().getMemory()
val amMemory = ((args.amMemory / minResMemory) * minResMemory) +
((if ((args.amMemory % minResMemory) == 0) 0 else minResMemory) -
memoryOverhead)
amMemory
args.amMemory
}

def setupSecurityToken(amContainer: ContainerLaunchContext) = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,6 @@ class Client(clientArgs: ClientArguments, hadoopConf: Configuration, spConf: Spa
}

def calculateAMMemory(newApp: GetNewApplicationResponse) :Int = {
// TODO: Need a replacement for the following code to fix -Xmx?
// val minResMemory: Int = newApp.getMinimumResourceCapability().getMemory()
// var amMemory = ((args.amMemory / minResMemory) * minResMemory) +
// ((if ((args.amMemory % minResMemory) == 0) 0 else minResMemory) -
// memoryOverhead )
args.amMemory
}

Expand Down

0 comments on commit 52b4e45

Please sign in to comment.