Skip to content

Commit

Permalink
[SPARK-20421][core] Mark internal listeners as deprecated.
Browse files Browse the repository at this point in the history
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 apache#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).
  • Loading branch information
Marcelo Vanzin committed Apr 25, 2017
1 parent 0a7f5f2 commit d16be2b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import org.apache.spark.scheduler._
* This class is thread-safe (unlike JobProgressListener)
*/
@DeveloperApi
@deprecated("This class will be removed in a future release.", "2.2.0")
class StorageStatusListener(conf: SparkConf) extends SparkListener {
// This maintains only blocks that are cached (i.e. storage level is not StorageLevel.NONE)
private[storage] val executorIdToStorageStatus = mutable.Map[String, StorageStatus]()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import org.apache.spark.internal.Logging
* class cannot mutate the source of the information. Accesses are not thread-safe.
*/
@DeveloperApi
@deprecated("This class may be removed or made private in a future release.", "2.2.0")
class StorageStatus(
val blockManagerId: BlockManagerId,
val maxMemory: Long,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
@DeveloperApi
@deprecated("This class will be removed in a future release.", "2.2.0")
class EnvironmentListener extends SparkListener {
var jvmInformation = Seq[(String, String)]()
var sparkProperties = Seq[(String, String)]()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ private[ui] case class ExecutorTaskSummary(
* A SparkListener that prepares information to be displayed on the ExecutorsTab
*/
@DeveloperApi
@deprecated("This class will be removed in a future release.", "2.2.0")
class ExecutorsListener(storageStatusListener: StorageStatusListener, conf: SparkConf)
extends SparkListener {
val executorToTaskSummary = LinkedHashMap[String, ExecutorTaskSummary]()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import org.apache.spark.ui.jobs.UIData._
* updating the internal data structures concurrently.
*/
@DeveloperApi
@deprecated("This class will be removed in a future release.", "2.2.0")
class JobProgressListener(conf: SparkConf) extends SparkListener with Logging {

// Define a handful of type aliases so that data structures' types can serve as documentation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ private[ui] class StorageTab(parent: SparkUI) extends SparkUITab(parent, "storag
* This class is thread-safe (unlike JobProgressListener)
*/
@DeveloperApi
@deprecated("This class will be removed in a future release.", "2.2.0")
class StorageListener(storageStatusListener: StorageStatusListener) extends BlockStatusListener {

private[ui] val _rddInfoMap = mutable.Map[Int, RDDInfo]() // exposed for testing
Expand Down

0 comments on commit d16be2b

Please sign in to comment.