Spark源码小记 发表于 2021-01-18 | 分类于 Spark | self=> 用于设置this的别名,以避免因为作用域变化导致接口的实现类不能引用 相当于 12345trait MyTrait { self => }// is equivalent totrait MyTrait2 { private val self = this} 参考资料Disambiguating ‘this’ in Scala, or what does ‘self =>’ mean?