Static variable will be initialized in worker node JVM, will not be serialized from master. But how about static volatile variable?
Recently I read the beam spark runner code, and i find that they use static volatile Broadcast variable. See https://github.com/apache/beam/blob/master/runners/spark/src/main/java/org/apache/beam/runners/spark/util/GlobalWatermarkHolder.java#L46 It confused me a lot, is static volatile variable different with static variable in the closure?