From 4c22c55ad6900433014c36f8c025645c3e261c43 Mon Sep 17 00:00:00 2001 From: Raymond Liu Date: Fri, 10 Jan 2014 09:44:44 +0800 Subject: Address comments to fix code formats --- .../src/main/scala/org/apache/spark/deploy/yarn/Client.scala | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'yarn/alpha') 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) { -- cgit v1.2.3