Github user chesterxgchen commented on a diff in the pull request:
https://github.com/apache/spark/pull/2204#discussion_r17048232
--- Diff:
yarn/common/src/test/scala/org/apache/spark/deploy/yarn/ClientBaseSuite.scala
---
@@ -232,6 +233,15 @@ class ClientBaseSuite extends FunSuite with Matchers {
def getFieldValue[A, B](clazz: Class[_], field: String, defaults: =>
B)(mapTo: A => B): B =
Try(clazz.getField(field)).map(_.get(null).asInstanceOf[A]).toOption.map(mapTo).getOrElse(defaults)
+ def getFieldValue2[A: ClassTag, A1: ClassTag, B](clazz: Class[_], field:
String,
--- End diff --
Can you elaborate this ? What's not true ?
Remove the classTag and run the unit test and see yourself.
Sent from my iPhone
> On Sep 2, 2014, at 11:00 PM, Prashant Sharma <[email protected]>
wrote:
>
> In
yarn/common/src/test/scala/org/apache/spark/deploy/yarn/ClientBaseSuite.scala:
>
> > @@ -232,6 +233,15 @@ class ClientBaseSuite extends FunSuite with
Matchers {
> > def getFieldValue[A, B](clazz: Class[_], field: String, defaults: =>
B)(mapTo: A => B): B =
> >
Try(clazz.getField(field)).map(_.get(null).asInstanceOf[A]).toOption.map(mapTo).getOrElse(defaults)
> >
> > + def getFieldValue2[A: ClassTag, A1: ClassTag, B](clazz: Class[_],
field: String,
> This is not true.
>
> â
> Reply to this email directly or view it on GitHub.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]