diff options
author | Raymond Liu <raymond.liu@intel.com> | 2014-01-10 09:44:44 +0800 |
---|---|---|
committer | Raymond Liu <raymond.liu@intel.com> | 2014-01-14 10:41:42 +0800 |
commit | 4c22c55ad6900433014c36f8c025645c3e261c43 (patch) | |
tree | b2b9454ccf8add8adbc7a62c1680228a1d9e038e /yarn/alpha | |
parent | 161ab93989d6fafdfb772e9230df984a5f902c7d (diff) | |
download | spark-4c22c55ad6900433014c36f8c025645c3e261c43.tar.gz spark-4c22c55ad6900433014c36f8c025645c3e261c43.tar.bz2 spark-4c22c55ad6900433014c36f8c025645c3e261c43.zip |
Address comments to fix code formats
Diffstat (limited to 'yarn/alpha')
-rw-r--r-- | yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/Client.scala | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/Client.scala b/yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/Client.scala index e58a926b59..71a64ecf58 100644 --- a/yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/Client.scala +++ b/yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/Client.scala @@ -110,15 +110,15 @@ class Client(clientArgs: ClientArguments, hadoopConf: Configuration, spConf: Spa appContext } - def calculateAMMemory(newApp: GetNewApplicationResponse) :Int = { - val minResMemory: Int = newApp.getMinimumResourceCapability().getMemory() + def calculateAMMemory(newApp: GetNewApplicationResponse): Int = { + val minResMemory = newApp.getMinimumResourceCapability().getMemory() val amMemory = ((args.amMemory / minResMemory) * minResMemory) + ((if ((args.amMemory % minResMemory) == 0) 0 else minResMemory) - - YarnAllocationHandler.MEMORY_OVERHEAD) + YarnAllocationHandler.MEMORY_OVERHEAD) amMemory } - def setupSecurityToken(amContainer :ContainerLaunchContext) = { + def setupSecurityToken(amContainer: ContainerLaunchContext) = { // Setup security tokens. val dob = new DataOutputBuffer() credentials.writeTokenStorageToStream(dob) @@ -154,7 +154,6 @@ class Client(clientArgs: ClientArguments, hadoopConf: Configuration, spConf: Spa ) val state = report.getYarnApplicationState() - val dsStatus = report.getFinalApplicationStatus() if (state == YarnApplicationState.FINISHED || state == YarnApplicationState.FAILED || state == YarnApplicationState.KILLED) { |