You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/04/25 07:33:39 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #32326: [SPARK-35212][Spark Core][DStreams] Added PreferRandom for the scenario that topic partitions need to be randomly distributed across all executors

HyukjinKwon commented on a change in pull request #32326:
URL: https://github.com/apache/spark/pull/32326#discussion_r619767006



##########
File path: core/src/main/scala/org/apache/spark/SparkContext.scala
##########
@@ -1812,6 +1812,13 @@ class SparkContext(config: SparkConf) extends Logging {
   /** The version of Spark on which this application is running. */
   def version: String = SPARK_VERSION
 
+  /**
+   * Return an array of executors' host name from the block manager.
+   */
+  def getExecutorHosts: Array[String] = {

Review comment:
       I wouldn't add this as an API at `SparkContext`. You could just do it with `getExecutorMemoryStatus.map(_._1).toArray`.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org