diff options
author | Patrick Wendell <pwendell@gmail.com> | 2013-12-25 00:38:31 -0800 |
---|---|---|
committer | Patrick Wendell <pwendell@gmail.com> | 2013-12-25 01:19:25 -0800 |
commit | b2b7514ba31be9c18f107ed466849e6360ded7c6 (patch) | |
tree | 18f25ab30ff5bb26fa3ba9b60a48f2e77a654d49 /core/src/main/scala/org/apache | |
parent | d5f23e0083b8b00109eb466ef5fb74558dcbc040 (diff) | |
download | spark-b2b7514ba31be9c18f107ed466849e6360ded7c6.tar.gz spark-b2b7514ba31be9c18f107ed466849e6360ded7c6.tar.bz2 spark-b2b7514ba31be9c18f107ed466849e6360ded7c6.zip |
Import clean-up (yay Aaron)
Diffstat (limited to 'core/src/main/scala/org/apache')
10 files changed, 33 insertions, 38 deletions
diff --git a/core/src/main/scala/org/apache/spark/deploy/DeployMessage.scala b/core/src/main/scala/org/apache/spark/deploy/DeployMessage.scala index 332c7e8bbf..82bb33a2ec 100644 --- a/core/src/main/scala/org/apache/spark/deploy/DeployMessage.scala +++ b/core/src/main/scala/org/apache/spark/deploy/DeployMessage.scala @@ -20,12 +20,11 @@ package org.apache.spark.deploy import scala.collection.immutable.List import org.apache.spark.deploy.ExecutorState.ExecutorState -import org.apache.spark.deploy.master.{DriverInfo, WorkerInfo, ApplicationInfo} +import org.apache.spark.deploy.master.{ApplicationInfo, DriverInfo, WorkerInfo} +import org.apache.spark.deploy.master.DriverState.DriverState import org.apache.spark.deploy.master.RecoveryState.MasterState import org.apache.spark.deploy.worker.{DriverRunner, ExecutorRunner} import org.apache.spark.util.Utils -import org.apache.spark.deploy.master.DriverState.DriverState - private[deploy] sealed trait DeployMessage extends Serializable diff --git a/core/src/main/scala/org/apache/spark/deploy/client/DriverClient.scala b/core/src/main/scala/org/apache/spark/deploy/client/DriverClient.scala index dd62172103..9c0a626204 100644 --- a/core/src/main/scala/org/apache/spark/deploy/client/DriverClient.scala +++ b/core/src/main/scala/org/apache/spark/deploy/client/DriverClient.scala @@ -17,21 +17,21 @@ package org.apache.spark.deploy.client +import java.util.concurrent.TimeUnit + +import scala.concurrent.Await +import scala.concurrent.duration.{Duration, FiniteDuration} + import akka.actor._ -import akka.remote.{RemotingLifecycleEvent} +import akka.actor.Actor.emptyBehavior +import akka.pattern.ask +import akka.remote.RemotingLifecycleEvent -import org.apache.spark.{SparkException, Logging} +import org.apache.spark.Logging import org.apache.spark.deploy.{DeployMessage, DriverDescription} import org.apache.spark.deploy.DeployMessages._ -import org.apache.spark.deploy.master.{MasterArguments, Master} -import akka.pattern.ask - -import org.apache.spark.util.{Utils, AkkaUtils} -import scala.concurrent.duration.{FiniteDuration, Duration} -import java.util.concurrent.TimeUnit -import akka.util.Timeout -import scala.concurrent.Await -import akka.actor.Actor.emptyBehavior +import org.apache.spark.deploy.master.Master +import org.apache.spark.util.{AkkaUtils, Utils} /** * Actor that sends a single message to the standalone master and then shuts down. diff --git a/core/src/main/scala/org/apache/spark/deploy/master/DriverInfo.scala b/core/src/main/scala/org/apache/spark/deploy/master/DriverInfo.scala index 69d150aea5..052c474d2c 100644 --- a/core/src/main/scala/org/apache/spark/deploy/master/DriverInfo.scala +++ b/core/src/main/scala/org/apache/spark/deploy/master/DriverInfo.scala @@ -17,10 +17,9 @@ package org.apache.spark.deploy.master -import org.apache.spark.deploy.{DriverDescription, ApplicationDescription} import java.util.Date -import akka.actor.ActorRef -import scala.collection.mutable + +import org.apache.spark.deploy.DriverDescription private[spark] class DriverInfo( val startTime: Long, diff --git a/core/src/main/scala/org/apache/spark/deploy/master/FileSystemPersistenceEngine.scala b/core/src/main/scala/org/apache/spark/deploy/master/FileSystemPersistenceEngine.scala index 44a046b4a4..74bb9ebf1d 100644 --- a/core/src/main/scala/org/apache/spark/deploy/master/FileSystemPersistenceEngine.scala +++ b/core/src/main/scala/org/apache/spark/deploy/master/FileSystemPersistenceEngine.scala @@ -19,8 +19,6 @@ package org.apache.spark.deploy.master import java.io._ -import scala.Serializable - import akka.serialization.Serialization import org.apache.spark.Logging diff --git a/core/src/main/scala/org/apache/spark/deploy/master/Master.scala b/core/src/main/scala/org/apache/spark/deploy/master/Master.scala index 939e000695..f5d6fdab5f 100644 --- a/core/src/main/scala/org/apache/spark/deploy/master/Master.scala +++ b/core/src/main/scala/org/apache/spark/deploy/master/Master.scala @@ -19,6 +19,7 @@ package org.apache.spark.deploy.master import java.text.SimpleDateFormat import java.util.Date +import java.util.concurrent.TimeUnit import scala.collection.mutable.{ArrayBuffer, HashMap, HashSet} import scala.concurrent.Await @@ -30,7 +31,7 @@ import akka.remote.{DisassociatedEvent, RemotingLifecycleEvent} import akka.serialization.SerializationExtension import org.apache.spark.{Logging, SparkException} -import org.apache.spark.deploy.{DriverDescription, ApplicationDescription, ExecutorState} +import org.apache.spark.deploy.{ApplicationDescription, DriverDescription, ExecutorState} import org.apache.spark.deploy.DeployMessages._ import org.apache.spark.deploy.master.MasterMessages._ import org.apache.spark.deploy.master.ui.MasterWebUI diff --git a/core/src/main/scala/org/apache/spark/deploy/master/WorkerInfo.scala b/core/src/main/scala/org/apache/spark/deploy/master/WorkerInfo.scala index 6e5177baa6..28cd46359c 100644 --- a/core/src/main/scala/org/apache/spark/deploy/master/WorkerInfo.scala +++ b/core/src/main/scala/org/apache/spark/deploy/master/WorkerInfo.scala @@ -17,8 +17,10 @@ package org.apache.spark.deploy.master -import akka.actor.ActorRef import scala.collection.mutable + +import akka.actor.ActorRef + import org.apache.spark.util.Utils private[spark] class WorkerInfo( diff --git a/core/src/main/scala/org/apache/spark/deploy/master/ui/IndexPage.scala b/core/src/main/scala/org/apache/spark/deploy/master/ui/IndexPage.scala index 24d10cec4a..6a99d7ac02 100644 --- a/core/src/main/scala/org/apache/spark/deploy/master/ui/IndexPage.scala +++ b/core/src/main/scala/org/apache/spark/deploy/master/ui/IndexPage.scala @@ -18,6 +18,7 @@ package org.apache.spark.deploy.master.ui import scala.concurrent.Await +import scala.concurrent.duration._ import scala.xml.Node import akka.pattern.ask @@ -26,8 +27,7 @@ import net.liftweb.json.JsonAST.JValue import org.apache.spark.deploy.{DeployWebUI, JsonProtocol} import org.apache.spark.deploy.DeployMessages.{MasterStateResponse, RequestMasterState} -import org.apache.spark.deploy.JsonProtocol -import org.apache.spark.deploy.master.{DriverInfo, ApplicationInfo, WorkerInfo} +import org.apache.spark.deploy.master.{ApplicationInfo, DriverInfo, WorkerInfo} import org.apache.spark.ui.UIUtils import org.apache.spark.util.Utils diff --git a/core/src/main/scala/org/apache/spark/deploy/worker/DriverRunner.scala b/core/src/main/scala/org/apache/spark/deploy/worker/DriverRunner.scala index ba13f22fc5..b030d6041a 100644 --- a/core/src/main/scala/org/apache/spark/deploy/worker/DriverRunner.scala +++ b/core/src/main/scala/org/apache/spark/deploy/worker/DriverRunner.scala @@ -19,17 +19,17 @@ package org.apache.spark.deploy.worker import java.io._ +import akka.actor.ActorRef import com.google.common.base.Charsets import com.google.common.io.Files +import org.apache.hadoop.conf.Configuration +import org.apache.hadoop.fs.{FileUtil, Path} import org.apache.spark.Logging -import org.apache.spark.util.Utils -import org.apache.hadoop.fs.{FileUtil, Path} -import org.apache.hadoop.conf.Configuration -import akka.actor.{ActorRef, ActorSelection} +import org.apache.spark.deploy.DriverDescription import org.apache.spark.deploy.DeployMessages.DriverStateChanged import org.apache.spark.deploy.master.DriverState -import org.apache.spark.deploy.DriverDescription +import org.apache.spark.util.Utils /** * Manages the execution of one driver process. diff --git a/core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala b/core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala index 3c5159ac13..b6a84fc371 100644 --- a/core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala +++ b/core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala @@ -25,15 +25,15 @@ import scala.collection.mutable.HashMap import scala.concurrent.duration._ import akka.actor._ -import akka.remote.{ DisassociatedEvent, RemotingLifecycleEvent} +import akka.remote.{DisassociatedEvent, RemotingLifecycleEvent} -import org.apache.spark.{SparkException, Logging} +import org.apache.spark.{Logging, SparkException} import org.apache.spark.deploy.{ExecutorDescription, ExecutorState} import org.apache.spark.deploy.DeployMessages._ import org.apache.spark.deploy.master.{DriverState, Master} import org.apache.spark.deploy.worker.ui.WorkerWebUI import org.apache.spark.metrics.MetricsSystem -import org.apache.spark.util.{Utils, AkkaUtils} +import org.apache.spark.util.{AkkaUtils, Utils} /** * @param masterUrls Each url should look like spark://host:port. diff --git a/core/src/main/scala/org/apache/spark/deploy/worker/ui/IndexPage.scala b/core/src/main/scala/org/apache/spark/deploy/worker/ui/IndexPage.scala index 35e8d58215..c8cafac3b6 100644 --- a/core/src/main/scala/org/apache/spark/deploy/worker/ui/IndexPage.scala +++ b/core/src/main/scala/org/apache/spark/deploy/worker/ui/IndexPage.scala @@ -17,15 +17,12 @@ package org.apache.spark.deploy.worker.ui -import javax.servlet.http.HttpServletRequest - -import scala.xml.Node - -import scala.concurrent.duration._ import scala.concurrent.Await +import scala.concurrent.duration._ +import scala.xml.Node import akka.pattern.ask - +import javax.servlet.http.HttpServletRequest import net.liftweb.json.JsonAST.JValue import org.apache.spark.deploy.JsonProtocol @@ -34,7 +31,6 @@ import org.apache.spark.deploy.worker.{DriverRunner, ExecutorRunner} import org.apache.spark.ui.UIUtils import org.apache.spark.util.Utils - private[spark] class IndexPage(parent: WorkerWebUI) { val workerActor = parent.worker.self val worker = parent.worker |