Skip to content
Snippets Groups Projects
Commit 561e9cc3 authored by Marcelo Vanzin's avatar Marcelo Vanzin
Browse files

[SPARK-20421][CORE] Mark internal listeners as deprecated.

These listeners weren't really meant for external consumption, but they're
public and marked with DeveloperApi. Adding the deprecated tag warns people
that they may soon go away (as they will as part of the work for SPARK-18085).

Note that not all types made public by https://github.com/apache/spark/pull/648
are being deprecated. Some remaining types are still exposed through the
SparkListener API.

Also note the text for StorageStatus is a tiny bit different, since I'm not
so sure I'll be able to remove it. But the effect for the users should be the
same (they should stop trying to use it).

Author: Marcelo Vanzin <vanzin@cloudera.com>

Closes #17766 from vanzin/SPARK-20421.
parent 7633933e
No related branches found
No related tags found
No related merge requests found
...@@ -30,6 +30,7 @@ import org.apache.spark.scheduler._ ...@@ -30,6 +30,7 @@ import org.apache.spark.scheduler._
* This class is thread-safe (unlike JobProgressListener) * This class is thread-safe (unlike JobProgressListener)
*/ */
@DeveloperApi @DeveloperApi
@deprecated("This class will be removed in a future release.", "2.2.0")
class StorageStatusListener(conf: SparkConf) extends SparkListener { class StorageStatusListener(conf: SparkConf) extends SparkListener {
// This maintains only blocks that are cached (i.e. storage level is not StorageLevel.NONE) // This maintains only blocks that are cached (i.e. storage level is not StorageLevel.NONE)
private[storage] val executorIdToStorageStatus = mutable.Map[String, StorageStatus]() private[storage] val executorIdToStorageStatus = mutable.Map[String, StorageStatus]()
......
...@@ -35,6 +35,7 @@ import org.apache.spark.internal.Logging ...@@ -35,6 +35,7 @@ import org.apache.spark.internal.Logging
* class cannot mutate the source of the information. Accesses are not thread-safe. * class cannot mutate the source of the information. Accesses are not thread-safe.
*/ */
@DeveloperApi @DeveloperApi
@deprecated("This class may be removed or made private in a future release.", "2.2.0")
class StorageStatus( class StorageStatus(
val blockManagerId: BlockManagerId, val blockManagerId: BlockManagerId,
val maxMemory: Long, val maxMemory: Long,
......
...@@ -32,6 +32,7 @@ private[ui] class EnvironmentTab(parent: SparkUI) extends SparkUITab(parent, "en ...@@ -32,6 +32,7 @@ private[ui] class EnvironmentTab(parent: SparkUI) extends SparkUITab(parent, "en
* A SparkListener that prepares information to be displayed on the EnvironmentTab * A SparkListener that prepares information to be displayed on the EnvironmentTab
*/ */
@DeveloperApi @DeveloperApi
@deprecated("This class will be removed in a future release.", "2.2.0")
class EnvironmentListener extends SparkListener { class EnvironmentListener extends SparkListener {
var jvmInformation = Seq[(String, String)]() var jvmInformation = Seq[(String, String)]()
var sparkProperties = Seq[(String, String)]() var sparkProperties = Seq[(String, String)]()
......
...@@ -62,6 +62,7 @@ private[ui] case class ExecutorTaskSummary( ...@@ -62,6 +62,7 @@ private[ui] case class ExecutorTaskSummary(
* A SparkListener that prepares information to be displayed on the ExecutorsTab * A SparkListener that prepares information to be displayed on the ExecutorsTab
*/ */
@DeveloperApi @DeveloperApi
@deprecated("This class will be removed in a future release.", "2.2.0")
class ExecutorsListener(storageStatusListener: StorageStatusListener, conf: SparkConf) class ExecutorsListener(storageStatusListener: StorageStatusListener, conf: SparkConf)
extends SparkListener { extends SparkListener {
val executorToTaskSummary = LinkedHashMap[String, ExecutorTaskSummary]() val executorToTaskSummary = LinkedHashMap[String, ExecutorTaskSummary]()
......
...@@ -41,6 +41,7 @@ import org.apache.spark.ui.jobs.UIData._ ...@@ -41,6 +41,7 @@ import org.apache.spark.ui.jobs.UIData._
* updating the internal data structures concurrently. * updating the internal data structures concurrently.
*/ */
@DeveloperApi @DeveloperApi
@deprecated("This class will be removed in a future release.", "2.2.0")
class JobProgressListener(conf: SparkConf) extends SparkListener with Logging { class JobProgressListener(conf: SparkConf) extends SparkListener with Logging {
// Define a handful of type aliases so that data structures' types can serve as documentation. // Define a handful of type aliases so that data structures' types can serve as documentation.
......
...@@ -39,6 +39,7 @@ private[ui] class StorageTab(parent: SparkUI) extends SparkUITab(parent, "storag ...@@ -39,6 +39,7 @@ private[ui] class StorageTab(parent: SparkUI) extends SparkUITab(parent, "storag
* This class is thread-safe (unlike JobProgressListener) * This class is thread-safe (unlike JobProgressListener)
*/ */
@DeveloperApi @DeveloperApi
@deprecated("This class will be removed in a future release.", "2.2.0")
class StorageListener(storageStatusListener: StorageStatusListener) extends BlockStatusListener { class StorageListener(storageStatusListener: StorageStatusListener) extends BlockStatusListener {
private[ui] val _rddInfoMap = mutable.Map[Int, RDDInfo]() // exposed for testing private[ui] val _rddInfoMap = mutable.Map[Int, RDDInfo]() // exposed for testing
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment