Repository: spark
Updated Branches:
  refs/heads/master 9deaa726e -> c995e0737


[SPARK-26140] followup: rename ShuffleMetricsReporter

## What changes were proposed in this pull request?
In https://github.com/apache/spark/pull/23105, due to working on two parallel 
PRs at once, I made the mistake of committing the copy of the PR that used the 
name ShuffleMetricsReporter for the interface, rather than the appropriate one 
ShuffleReadMetricsReporter. This patch fixes that.

## How was this patch tested?
This should be fine as long as compilation passes.

Closes #23147 from rxin/ShuffleReadMetricsReporter.

Authored-by: Reynold Xin <r...@databricks.com>
Signed-off-by: gatorsmile <gatorsm...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/c995e073
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/c995e073
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/c995e073

Branch: refs/heads/master
Commit: c995e0737de66441052fbf0fb941c5ea05d0163f
Parents: 9deaa72
Author: Reynold Xin <r...@databricks.com>
Authored: Mon Nov 26 17:01:56 2018 -0800
Committer: gatorsmile <gatorsm...@gmail.com>
Committed: Mon Nov 26 17:01:56 2018 -0800

----------------------------------------------------------------------
 .../spark/executor/ShuffleReadMetrics.scala     |  4 +--
 .../spark/shuffle/BlockStoreShuffleReader.scala |  2 +-
 .../apache/spark/shuffle/ShuffleManager.scala   |  2 +-
 .../spark/shuffle/ShuffleMetricsReporter.scala  | 33 --------------------
 .../spark/shuffle/sort/SortShuffleManager.scala |  2 +-
 .../storage/ShuffleBlockFetcherIterator.scala   |  4 +--
 6 files changed, 7 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/c995e073/core/src/main/scala/org/apache/spark/executor/ShuffleReadMetrics.scala
----------------------------------------------------------------------
diff --git 
a/core/src/main/scala/org/apache/spark/executor/ShuffleReadMetrics.scala 
b/core/src/main/scala/org/apache/spark/executor/ShuffleReadMetrics.scala
index 2f97e96..12c4b8f 100644
--- a/core/src/main/scala/org/apache/spark/executor/ShuffleReadMetrics.scala
+++ b/core/src/main/scala/org/apache/spark/executor/ShuffleReadMetrics.scala
@@ -18,7 +18,7 @@
 package org.apache.spark.executor
 
 import org.apache.spark.annotation.DeveloperApi
-import org.apache.spark.shuffle.ShuffleMetricsReporter
+import org.apache.spark.shuffle.ShuffleReadMetricsReporter
 import org.apache.spark.util.LongAccumulator
 
 
@@ -130,7 +130,7 @@ class ShuffleReadMetrics private[spark] () extends 
Serializable {
  * shuffle dependency, and all temporary metrics will be merged into the 
[[ShuffleReadMetrics]] at
  * last.
  */
-private[spark] class TempShuffleReadMetrics extends ShuffleMetricsReporter {
+private[spark] class TempShuffleReadMetrics extends ShuffleReadMetricsReporter 
{
   private[this] var _remoteBlocksFetched = 0L
   private[this] var _localBlocksFetched = 0L
   private[this] var _remoteBytesRead = 0L

http://git-wip-us.apache.org/repos/asf/spark/blob/c995e073/core/src/main/scala/org/apache/spark/shuffle/BlockStoreShuffleReader.scala
----------------------------------------------------------------------
diff --git 
a/core/src/main/scala/org/apache/spark/shuffle/BlockStoreShuffleReader.scala 
b/core/src/main/scala/org/apache/spark/shuffle/BlockStoreShuffleReader.scala
index 7cb031c..27e2f98 100644
--- a/core/src/main/scala/org/apache/spark/shuffle/BlockStoreShuffleReader.scala
+++ b/core/src/main/scala/org/apache/spark/shuffle/BlockStoreShuffleReader.scala
@@ -33,7 +33,7 @@ private[spark] class BlockStoreShuffleReader[K, C](
     startPartition: Int,
     endPartition: Int,
     context: TaskContext,
-    readMetrics: ShuffleMetricsReporter,
+    readMetrics: ShuffleReadMetricsReporter,
     serializerManager: SerializerManager = SparkEnv.get.serializerManager,
     blockManager: BlockManager = SparkEnv.get.blockManager,
     mapOutputTracker: MapOutputTracker = SparkEnv.get.mapOutputTracker)

http://git-wip-us.apache.org/repos/asf/spark/blob/c995e073/core/src/main/scala/org/apache/spark/shuffle/ShuffleManager.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/shuffle/ShuffleManager.scala 
b/core/src/main/scala/org/apache/spark/shuffle/ShuffleManager.scala
index d1061d8..df601cb 100644
--- a/core/src/main/scala/org/apache/spark/shuffle/ShuffleManager.scala
+++ b/core/src/main/scala/org/apache/spark/shuffle/ShuffleManager.scala
@@ -49,7 +49,7 @@ private[spark] trait ShuffleManager {
       startPartition: Int,
       endPartition: Int,
       context: TaskContext,
-      metrics: ShuffleMetricsReporter): ShuffleReader[K, C]
+      metrics: ShuffleReadMetricsReporter): ShuffleReader[K, C]
 
   /**
    * Remove a shuffle's metadata from the ShuffleManager.

http://git-wip-us.apache.org/repos/asf/spark/blob/c995e073/core/src/main/scala/org/apache/spark/shuffle/ShuffleMetricsReporter.scala
----------------------------------------------------------------------
diff --git 
a/core/src/main/scala/org/apache/spark/shuffle/ShuffleMetricsReporter.scala 
b/core/src/main/scala/org/apache/spark/shuffle/ShuffleMetricsReporter.scala
deleted file mode 100644
index 3286514..0000000
--- a/core/src/main/scala/org/apache/spark/shuffle/ShuffleMetricsReporter.scala
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.spark.shuffle
-
-/**
- * An interface for reporting shuffle information, for each shuffle. This 
interface assumes
- * all the methods are called on a single-threaded, i.e. concrete 
implementations would not need
- * to synchronize anything.
- */
-private[spark] trait ShuffleMetricsReporter {
-  def incRemoteBlocksFetched(v: Long): Unit
-  def incLocalBlocksFetched(v: Long): Unit
-  def incRemoteBytesRead(v: Long): Unit
-  def incRemoteBytesReadToDisk(v: Long): Unit
-  def incLocalBytesRead(v: Long): Unit
-  def incFetchWaitTime(v: Long): Unit
-  def incRecordsRead(v: Long): Unit
-}

http://git-wip-us.apache.org/repos/asf/spark/blob/c995e073/core/src/main/scala/org/apache/spark/shuffle/sort/SortShuffleManager.scala
----------------------------------------------------------------------
diff --git 
a/core/src/main/scala/org/apache/spark/shuffle/sort/SortShuffleManager.scala 
b/core/src/main/scala/org/apache/spark/shuffle/sort/SortShuffleManager.scala
index 57c3150..4f8be19 100644
--- a/core/src/main/scala/org/apache/spark/shuffle/sort/SortShuffleManager.scala
+++ b/core/src/main/scala/org/apache/spark/shuffle/sort/SortShuffleManager.scala
@@ -115,7 +115,7 @@ private[spark] class SortShuffleManager(conf: SparkConf) 
extends ShuffleManager
       startPartition: Int,
       endPartition: Int,
       context: TaskContext,
-      metrics: ShuffleMetricsReporter): ShuffleReader[K, C] = {
+      metrics: ShuffleReadMetricsReporter): ShuffleReader[K, C] = {
     new BlockStoreShuffleReader(
       handle.asInstanceOf[BaseShuffleHandle[K, _, C]],
       startPartition, endPartition, context, metrics)

http://git-wip-us.apache.org/repos/asf/spark/blob/c995e073/core/src/main/scala/org/apache/spark/storage/ShuffleBlockFetcherIterator.scala
----------------------------------------------------------------------
diff --git 
a/core/src/main/scala/org/apache/spark/storage/ShuffleBlockFetcherIterator.scala
 
b/core/src/main/scala/org/apache/spark/storage/ShuffleBlockFetcherIterator.scala
index a2e0713..86f7c08 100644
--- 
a/core/src/main/scala/org/apache/spark/storage/ShuffleBlockFetcherIterator.scala
+++ 
b/core/src/main/scala/org/apache/spark/storage/ShuffleBlockFetcherIterator.scala
@@ -30,7 +30,7 @@ import org.apache.spark.internal.Logging
 import org.apache.spark.network.buffer.{FileSegmentManagedBuffer, 
ManagedBuffer}
 import org.apache.spark.network.shuffle._
 import org.apache.spark.network.util.TransportConf
-import org.apache.spark.shuffle.{FetchFailedException, ShuffleMetricsReporter}
+import org.apache.spark.shuffle.{FetchFailedException, 
ShuffleReadMetricsReporter}
 import org.apache.spark.util.Utils
 import org.apache.spark.util.io.ChunkedByteBufferOutputStream
 
@@ -73,7 +73,7 @@ final class ShuffleBlockFetcherIterator(
     maxBlocksInFlightPerAddress: Int,
     maxReqSizeShuffleToMem: Long,
     detectCorrupt: Boolean,
-    shuffleMetrics: ShuffleMetricsReporter)
+    shuffleMetrics: ShuffleReadMetricsReporter)
   extends Iterator[(BlockId, InputStream)] with DownloadFileManager with 
Logging {
 
   import ShuffleBlockFetcherIterator._


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to