You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spark.apache.org by xing <eh...@gmail.com> on 2015/03/20 23:59:09 UTC

Re: Error: 'SparkContext' object has no attribute 'getActiveStageIds'

getStageInfo in self._jtracker.getStageInfo below seems not
implemented/included in the current python library.

   def getStageInfo(self, stageId):
        """
        Returns a :class:`SparkStageInfo` object, or None if the stage
        info could not be found or was garbage collected.
        """
        stage = self._jtracker.getStageInfo(stageId)
        if stage is not None:
            # TODO: fetch them in batch for better performance
            attrs = [getattr(stage, f)() for f in
SparkStageInfo._fields[1:]]
            return SparkStageInfo(stageId, *attrs)



--
View this message in context: http://apache-spark-developers-list.1001551.n3.nabble.com/Error-SparkContext-object-has-no-attribute-getActiveStageIds-tp11136p11140.html
Sent from the Apache Spark Developers List mailing list archive at Nabble.com.

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


Re: Error: 'SparkContext' object has no attribute 'getActiveStageIds'

Posted by Ted Yu <yu...@gmail.com>.
Please take a look
at core/src/main/scala/org/apache/spark/SparkStatusTracker.scala, around
line 58:
  def getActiveStageIds(): Array[Int] = {

Cheers

On Fri, Mar 20, 2015 at 3:59 PM, xing <eh...@gmail.com> wrote:

> getStageInfo in self._jtracker.getStageInfo below seems not
> implemented/included in the current python library.
>
>    def getStageInfo(self, stageId):
>         """
>         Returns a :class:`SparkStageInfo` object, or None if the stage
>         info could not be found or was garbage collected.
>         """
>         stage = self._jtracker.getStageInfo(stageId)
>         if stage is not None:
>             # TODO: fetch them in batch for better performance
>             attrs = [getattr(stage, f)() for f in
> SparkStageInfo._fields[1:]]
>             return SparkStageInfo(stageId, *attrs)
>
>
>
> --
> View this message in context:
> http://apache-spark-developers-list.1001551.n3.nabble.com/Error-SparkContext-object-has-no-attribute-getActiveStageIds-tp11136p11140.html
> Sent from the Apache Spark Developers List mailing list archive at
> Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@spark.apache.org
> For additional commands, e-mail: dev-help@spark.apache.org
>
>