title: Global variable value update at task level in spark
body: <p>I have a requirement of doing some integer variable updates based on some computations in my transformations . For eg if I get some discrepancy in record matching then I want to increment a value and use it then and there .</p>
  
  <p>I have explored the use of accumulators, </p>
  
  <blockquote>
    <p>but its value can only be used in driver</p>
  </blockquote>
  
  <p>which will be very tedious for me as I am dealing with billions of rows.
  Please suggest me a possible solution for global variable updates in spark like COUNTERS in MapReduce framework.</p>