Repository: spark Updated Branches: refs/heads/master e46cb78b3 -> 7f7133bdc
[MINOR][CORE] fix warnings on depreciated methods in MesosClusterSchedulerSuite and DiskBlockObjectWriterSuite ## What changes were proposed in this pull request? Fixed warnings below after scanning through warnings during build: ``` [warn] /home/jenkins/workspace/SparkPullRequestBuilder/core/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterSchedulerSuite.scala:34: imported `Utils' is permanently hidden by definition of object Utils in package mesos [warn] import org.apache.spark.scheduler.cluster.mesos.Utils [warn] ^ ``` and ``` [warn] /home/jenkins/workspace/SparkPullRequestBuilder/core/src/test/scala/org/apache/spark/storage/DiskBlockObjectWriterSuite.scala:113: method shuffleBytesWritten in class ShuffleWriteMetrics is deprecated: use bytesWritten instead [warn] assert(writeMetrics.shuffleBytesWritten === file.length()) [warn] ^ [warn] /home/jenkins/workspace/SparkPullRequestBuilder/core/src/test/scala/org/apache/spark/storage/DiskBlockObjectWriterSuite.scala:119: method shuffleBytesWritten in class ShuffleWriteMetrics is deprecated: use bytesWritten instead [warn] assert(writeMetrics.shuffleBytesWritten === file.length()) [warn] ^ [warn] /home/jenkins/workspace/SparkPullRequestBuilder/core/src/test/scala/org/apache/spark/storage/DiskBlockObjectWriterSuite.scala:131: method shuffleBytesWritten in class ShuffleWriteMetrics is deprecated: use bytesWritten instead [warn] assert(writeMetrics.shuffleBytesWritten === file.length()) [warn] ^ [warn] /home/jenkins/workspace/SparkPullRequestBuilder/core/src/test/scala/org/apache/spark/storage/DiskBlockObjectWriterSuite.scala:135: method shuffleBytesWritten in class ShuffleWriteMetrics is deprecated: use bytesWritten instead [warn] assert(writeMetrics.shuffleBytesWritten === file.length()) [warn] ^ ``` ## How was this patch tested? Tested manually on local laptop. Author: Xin Ren <[email protected]> Closes #14609 from keypointt/suiteWarnings. Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/7f7133bd Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/7f7133bd Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/7f7133bd Branch: refs/heads/master Commit: 7f7133bdccecaccd6dfb52f13c18c1e320d65f86 Parents: e46cb78 Author: Xin Ren <[email protected]> Authored: Sat Aug 13 11:29:42 2016 +0100 Committer: Sean Owen <[email protected]> Committed: Sat Aug 13 11:29:42 2016 +0100 ---------------------------------------------------------------------- .../scheduler/cluster/mesos/MesosClusterSchedulerSuite.scala | 1 - .../apache/spark/storage/DiskBlockObjectWriterSuite.scala | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/7f7133bd/core/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterSchedulerSuite.scala ---------------------------------------------------------------------- diff --git a/core/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterSchedulerSuite.scala b/core/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterSchedulerSuite.scala index 0260759..87d9080 100644 --- a/core/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterSchedulerSuite.scala +++ b/core/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterSchedulerSuite.scala @@ -31,7 +31,6 @@ import org.scalatest.mock.MockitoSugar import org.apache.spark.{LocalSparkContext, SparkConf, SparkFunSuite} import org.apache.spark.deploy.Command import org.apache.spark.deploy.mesos.MesosDriverDescription -import org.apache.spark.scheduler.cluster.mesos.Utils class MesosClusterSchedulerSuite extends SparkFunSuite with LocalSparkContext with MockitoSugar { http://git-wip-us.apache.org/repos/asf/spark/blob/7f7133bd/core/src/test/scala/org/apache/spark/storage/DiskBlockObjectWriterSuite.scala ---------------------------------------------------------------------- diff --git a/core/src/test/scala/org/apache/spark/storage/DiskBlockObjectWriterSuite.scala b/core/src/test/scala/org/apache/spark/storage/DiskBlockObjectWriterSuite.scala index 059c2c2..684e978 100644 --- a/core/src/test/scala/org/apache/spark/storage/DiskBlockObjectWriterSuite.scala +++ b/core/src/test/scala/org/apache/spark/storage/DiskBlockObjectWriterSuite.scala @@ -110,13 +110,13 @@ class DiskBlockObjectWriterSuite extends SparkFunSuite with BeforeAndAfterEach { writer.write(Long.box(20), Long.box(30)) val firstSegment = writer.commitAndGet() assert(firstSegment.length === file.length()) - assert(writeMetrics.shuffleBytesWritten === file.length()) + assert(writeMetrics.bytesWritten === file.length()) writer.write(Long.box(40), Long.box(50)) writer.revertPartialWritesAndClose() assert(firstSegment.length === file.length()) - assert(writeMetrics.shuffleBytesWritten === file.length()) + assert(writeMetrics.bytesWritten === file.length()) } test("calling revertPartialWritesAndClose() after commit() should have no effect") { @@ -128,11 +128,11 @@ class DiskBlockObjectWriterSuite extends SparkFunSuite with BeforeAndAfterEach { writer.write(Long.box(20), Long.box(30)) val firstSegment = writer.commitAndGet() assert(firstSegment.length === file.length()) - assert(writeMetrics.shuffleBytesWritten === file.length()) + assert(writeMetrics.bytesWritten === file.length()) writer.revertPartialWritesAndClose() assert(firstSegment.length === file.length()) - assert(writeMetrics.shuffleBytesWritten === file.length()) + assert(writeMetrics.bytesWritten === file.length()) } test("calling revertPartialWritesAndClose() on a closed block writer should have no effect") { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
