1.选中spark函数,ctrl+左单击看源码,点右上角,attach source code 2.下载https://github.com/apache/spark,解压后,从attach source code 弹出框内选择该文件即可