boradcast例子代码:

scala版本

 

 spark共享变量之Accumulator

例子代码:

scala版本