You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by pravingadakh <gi...@git.apache.org> on 2016/05/02 18:23:40 UTC

[GitHub] spark pull request: [SPARK-14585][ML][WIP] Provide accessor method...

Github user pravingadakh commented on the pull request:

    https://github.com/apache/spark/pull/12420#issuecomment-216318404
  
    @jkbradley I have stumbled across an issue, would really appreciate your input. Have a look at this method:
    
    ```
    def getStage[T <: PipelineStage : ClassTag](i: Int): T = {
        getStages(i) match {
          case stage: T => stage
          case stage => throw new IllegalArgumentException(
            s"Expected stage of type ${stage.getClass.getName}"
          )
        }
      }
    ```
    
    How do I avoid usage of `ClassTag` here (since those are not so java friendly)? Also I'm a bit skeptical about the error message.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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