Skip to content

Commit 0b66948

Browse files
Minor formatting/import fixes.
1 parent 4fc518c commit 0b66948

File tree

6 files changed

+9
-10
lines changed

6 files changed

+9
-10
lines changed

core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
package org.apache.spark.deploy.history
1919

20-
import java.io.{File, FileOutputStream, BufferedInputStream, FileNotFoundException, IOException, InputStream}
20+
import java.io.{BufferedInputStream, FileNotFoundException, IOException, InputStream}
2121
import java.util.concurrent.{ExecutorService, Executors, TimeUnit}
2222

2323
import scala.collection.mutable

core/src/main/scala/org/apache/spark/status/api/v1/EventLogDownloadResource.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
*/
1717
package org.apache.spark.status.api.v1
1818

19-
import java.io.{File, FileOutputStream, BufferedInputStream, FileInputStream, OutputStream}
19+
import java.io.{File, FileOutputStream, OutputStream}
2020
import javax.ws.rs.{GET, Produces}
21-
import javax.ws.rs.core.{Response, StreamingOutput, MediaType}
21+
import javax.ws.rs.core.{MediaType, Response, StreamingOutput}
2222

2323
import scala.collection.mutable.ArrayBuffer
2424

core/src/main/scala/org/apache/spark/status/api/v1/JacksonMessageWriter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ private[v1] class JacksonMessageWriter extends MessageBodyWriter[Object]{
6868
multivaluedMap: MultivaluedMap[String, AnyRef],
6969
outputStream: OutputStream): Unit = {
7070
t match {
71-
case ErrorWrapper(err) => outputStream.write(err.getBytes())
71+
case ErrorWrapper(err) => outputStream.write(err.getBytes("utf-8"))
7272
case _ => mapper.writeValue(outputStream, t)
7373
}
7474
}

core/src/main/scala/org/apache/spark/util/Utils.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ import java.io._
2121
import java.lang.management.ManagementFactory
2222
import java.net._
2323
import java.nio.ByteBuffer
24-
import java.util.zip.{ZipEntry, ZipOutputStream}
2524
import java.util.{PriorityQueue, Properties, Locale, Random, UUID}
25+
import java.util.zip.{ZipEntry, ZipOutputStream}
2626
import java.util.concurrent._
2727
import javax.net.ssl.HttpsURLConnection
2828

core/src/test/scala/org/apache/spark/deploy/history/FsHistoryProviderSuite.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,12 @@
1717

1818
package org.apache.spark.deploy.history
1919

20-
import java.io.{ByteArrayOutputStream, FileInputStream, BufferedOutputStream, File, FileOutputStream, OutputStreamWriter}
20+
import java.io.{BufferedOutputStream, FileInputStream, File, FileOutputStream, OutputStreamWriter}
2121
import java.net.URI
2222
import java.util.concurrent.TimeUnit
2323
import java.util.zip.ZipInputStream
2424

2525
import scala.io.Source
26-
import scala.collection.JavaConverters._
2726

2827
import org.apache.hadoop.fs.Path
2928
import org.json4s.jackson.JsonMethods._

core/src/test/scala/org/apache/spark/deploy/history/HistoryServerSuite.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@
1616
*/
1717
package org.apache.spark.deploy.history
1818

19-
import java.io.{FileOutputStream, BufferedOutputStream, InputStream, File, FileInputStream, FileWriter, IOException}
19+
import java.io.{ BufferedOutputStream, FileOutputStream, File, FileInputStream,
20+
FileWriter, InputStream, IOException}
2021
import java.net.{HttpURLConnection, URL}
2122
import java.util.zip.ZipInputStream
22-
import javax.servlet.http
2323
import javax.servlet.http.{HttpServletRequest, HttpServletResponse}
2424

2525
import org.apache.commons.io.{FileUtils, IOUtils}
2626
import org.mockito.Mockito.when
2727
import org.scalatest.{BeforeAndAfter, FunSuite, Matchers}
2828
import org.scalatest.mock.MockitoSugar
2929

30-
import org.apache.spark.util.Utils
3130
import org.apache.spark.{JsonTestUtils, SecurityManager, SparkConf}
3231
import org.apache.spark.ui.SparkUI
32+
import org.apache.spark.util.Utils
3333

3434
/**
3535
* A collection of tests against the historyserver, including comparing responses from the json

0 commit comments

Comments
 (0)