1. def receiverStream[T: ClassTag](receiver: Receiver[T]): ReceiverInputDStream[T] = {
    2. withNamedScope("receiver stream") {
    3. new PluggableInputDStream[T](this, receiver)
    4. }
    5. }

    T: ClassTag 约束了类型是ClassTag

    如何优雅的使用ClassTag,这篇文章可能对你有帮助:https://zhuanlan.zhihu.com/p/69792401
    (我还没认真看…)