Shared variables in spark