title: Can we use flatMapGroupsWithState in batch mode?
body: <p>Can we use <code>flatMapGroupsWithState</code> in batch mode?</p>
  <p>We have been using <code>flatMapGroupsWithState</code> API to do sessionization of our click stream data. Now we are planning to use it to run in Batch Mode.</p>
  <p>For more context check this video posted by <a href="https://stackoverflow.com/users/9726075/bartosz-konieczny?tab=profile">Bartosz Konieczny</a> in youtube <a href="https://www.youtube.com/watch?v=iajzckThnm4&amp;t=1730s" rel="nofollow noreferrer">Using Apache Spark to Solve Sessionization Problem in Batch and Streaming</a></p>
  <p>Can we get rid off the <code>full-outer</code> join and use <code>mapGroupWithState</code> with a <code>checkpoint folder</code> and Spark State</p>