【发布时间】:2014-11-26 06:31:18
【问题描述】:
当使用 py4j 触发 jvm 时,有没有办法像 scala/java 那样进行类型转换?
基本上,我想翻译一下:
someOtherTypeInstance.asInstanceOf[RDD[Any]]
变成这样的:
someOtherTypeInstance = gateway.jvm.getSomeOtherTypeInstance()
someOtherTypeInstance.asInstanceOf(gateway.jvm.RDD[Any]) // don't know how to deal with generics
【问题讨论】: