Skip to content

Commit

Permalink
fix some import ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
squito committed Mar 10, 2015
1 parent 0dc3ea7 commit 1b78cb7
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,22 @@

package org.apache.spark.deploy.history

import java.io.{IOException, BufferedInputStream, FileNotFoundException, InputStream}
import java.io.{BufferedInputStream, FileNotFoundException, IOException, InputStream}
import java.util.concurrent.{ExecutorService, Executors, TimeUnit}

import scala.collection.mutable
import scala.concurrent.duration.Duration

import com.google.common.util.concurrent.ThreadFactoryBuilder

import com.google.common.util.concurrent.MoreExecutors
import org.apache.hadoop.fs.permission.AccessControlException
import com.google.common.util.concurrent.{MoreExecutors, ThreadFactoryBuilder}
import org.apache.hadoop.fs.{FileStatus, Path}
import org.apache.hadoop.fs.permission.AccessControlException

import org.apache.spark.{Logging, SecurityManager, SparkConf}
import org.apache.spark.deploy.SparkHadoopUtil
import org.apache.spark.io.CompressionCodec
import org.apache.spark.scheduler._
import org.apache.spark.ui.SparkUI
import org.apache.spark.util.Utils
import org.apache.spark.{Logging, SecurityManager, SparkConf}


/**
* A class that provides application history from event logs stored in the file system.
Expand All @@ -44,7 +42,7 @@ import org.apache.spark.{Logging, SecurityManager, SparkConf}
private[history] class FsHistoryProvider(conf: SparkConf) extends ApplicationHistoryProvider
with Logging {

import FsHistoryProvider._
import org.apache.spark.deploy.history.FsHistoryProvider._

private val NOT_STARTED = "<Not Started>"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import java.util.NoSuchElementException
import javax.servlet.http.{HttpServlet, HttpServletRequest, HttpServletResponse}

import com.google.common.cache._
import org.apache.spark.status.api.v1.{ApplicationsListResource, ApplicationInfo, JsonRootResource, UIRoot}
import org.eclipse.jetty.servlet.{ServletContextHandler, ServletHolder}

import org.apache.spark.{Logging, SecurityManager, SparkConf}
import org.apache.spark.deploy.SparkHadoopUtil
import org.apache.spark.status.api.v1.{ApplicationInfo, ApplicationsListResource, JsonRootResource, UIRoot}
import org.apache.spark.ui.{SparkUI, UIUtils, WebUI}
import org.apache.spark.ui.JettyUtils._
import org.apache.spark.util.SignalLogger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
*/
package org.apache.spark.status.api.v1

import javax.ws.rs.{PathParam, GET, Produces}
import javax.ws.rs.{GET, PathParam, Produces}
import javax.ws.rs.core.MediaType

import org.apache.spark.storage.{StorageUtils, StorageStatus, RDDInfo}
import org.apache.spark.storage.{RDDInfo, StorageStatus, StorageUtils}
import org.apache.spark.ui.storage.StorageListener

@Produces(Array(MediaType.APPLICATION_JSON))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,14 @@
package org.apache.spark.status.api.v1

import java.util.Date
import javax.ws.rs.{QueryParam, PathParam, GET, Produces}
import javax.ws.rs.{GET, PathParam, Produces, QueryParam}
import javax.ws.rs.core.MediaType

import org.apache.spark.executor.{
TaskMetrics => InternalTaskMetrics,
InputMetrics => InternalInputMetrics,
OutputMetrics => InternalOutputMetrics,
ShuffleReadMetrics => InternalShuffleReadMetrics,
ShuffleWriteMetrics => InternalShuffleWriteMetrics
}
import org.apache.spark.executor.{InputMetrics => InternalInputMetrics, OutputMetrics => InternalOutputMetrics, ShuffleReadMetrics => InternalShuffleReadMetrics, ShuffleWriteMetrics => InternalShuffleWriteMetrics, TaskMetrics => InternalTaskMetrics}
import org.apache.spark.scheduler.StageInfo
import org.apache.spark.status.api._
import org.apache.spark.ui.SparkUI
import org.apache.spark.ui.jobs.UIData.{TaskUIData, StageUIData}
import org.apache.spark.ui.jobs.UIData.{StageUIData, TaskUIData}

@Produces(Array(MediaType.APPLICATION_JSON))
class AllStagesResource(uiRoot: UIRoot) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
package org.apache.spark.status.api.v1

import java.util.Date
import javax.ws.rs.{DefaultValue, GET, Produces, QueryParam}
import javax.ws.rs.core.MediaType
import javax.ws.rs.{DefaultValue, QueryParam, Produces, GET}

import org.apache.spark.deploy.history.ApplicationHistoryInfo
import org.apache.spark.deploy.master.{ApplicationInfo => InternalApplicationInfo}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
package org.apache.spark.status.api.v1

import java.text.SimpleDateFormat
import java.util.{SimpleTimeZone, Calendar}
import java.util.{Calendar, SimpleTimeZone}
import javax.ws.rs.Produces
import javax.ws.rs.core.MediaType
import javax.ws.rs.ext.{ContextResolver, Provider}

import com.fasterxml.jackson.annotation.JsonInclude
import com.fasterxml.jackson.databind.{SerializationFeature, ObjectMapper}
import com.fasterxml.jackson.databind.{ObjectMapper, SerializationFeature}

@Provider
@Produces(Array(MediaType.APPLICATION_JSON))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
package org.apache.spark.status.api.v1

import javax.ws.rs.{PathParam, GET, Produces}
import javax.ws.rs.{GET, PathParam, Produces}
import javax.ws.rs.core.MediaType

import org.apache.spark.ui.exec.ExecutorsPage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,16 @@ package org.apache.spark.status.api.v1

import javax.servlet.ServletContext
import javax.ws.rs._
import javax.ws.rs.core.{Response, Context}
import javax.ws.rs.core.{Context, Response}

import com.sun.jersey.api.core.ResourceConfig
import com.sun.jersey.spi.container.servlet.ServletContainer

import org.eclipse.jetty.server.handler.ContextHandler
import org.eclipse.jetty.servlet.{ServletHolder, ServletContextHandler}
import org.glassfish.jersey.jackson._
import org.eclipse.jetty.servlet.{ServletContextHandler, ServletHolder}

import org.apache.spark.SecurityManager
import org.apache.spark.ui.SparkUI


@Path("/v1")
class JsonRootResource extends UIRootFromServletContext {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
package org.apache.spark.status.api.v1

import javax.ws.rs.{PathParam, GET, Produces}
import javax.ws.rs.{GET, PathParam, Produces}
import javax.ws.rs.core.MediaType

import org.apache.spark.SparkException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package org.apache.spark.status.api.v1
import javax.ws.rs.WebApplicationException
import javax.ws.rs.core.Response

import com.sun.jersey.spi.container.{ContainerRequest,ContainerRequestFilter}
import com.sun.jersey.spi.container.{ContainerRequest, ContainerRequestFilter}

class SecurityFilter extends ContainerRequestFilter with UIRootFromServletContext {
def filter(req: ContainerRequest): ContainerRequest = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

package org.apache.spark.status.api.v1

import org.apache.spark.status.api.StageStatus

import scala.collection.Map

import org.apache.spark.status.api.StageStatus

case class StageData(
status: StageStatus,
stageId: Int,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,16 @@
*/
package org.apache.spark.deploy.history

import java.io.{IOException, FileInputStream, FileWriter, File}
import java.io.{File, FileInputStream, FileWriter, IOException}
import java.net.{HttpURLConnection, URL}
import javax.servlet.http.{HttpServletRequest, HttpServletResponse}

import org.apache.commons.io.{FileUtils, IOUtils}

import org.apache.spark.{SecurityManager, SparkConf}
import org.scalatest.{BeforeAndAfter, Matchers, FunSuite}

import org.apache.hadoop.fs.Path
import org.mockito.Mockito.{when}
import org.mockito.Mockito.when
import org.scalatest.{BeforeAndAfter, FunSuite, Matchers}
import org.scalatest.mock.MockitoSugar

import org.apache.spark.{SecurityManager, SparkConf}
import org.apache.spark.ui.SparkUI

class HistoryServerSuite extends FunSuite with BeforeAndAfter with Matchers with MockitoSugar {
Expand Down

0 comments on commit 1b78cb7

Please sign in to comment.