GitHub user brkyvz opened a pull request:

    https://github.com/apache/spark/pull/18595

    [SPARK-21370][SS] Create distinction between read-only and read-write state 
stores

    ## What changes were proposed in this pull request?
    
    Currently the HDFSBackedStateStore sets it's state as UPDATING as it is 
initialized.
    For every trigger, we create two state stores, one used during "Restore" 
and one during "Save". The "Restore" StateStore is read-only. This state store 
gets "aborted" after a task is completed, which results in a file being created 
and immediately deleted.
    This can be avoided if there is an INITIALIZED state and abort deletes 
files only when there is an update to the state store using "put" or "remove".
    ## How was this patch tested?
    
    Unit tests in `StateStoreSuite`.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/brkyvz/spark read-only-state-store

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/18595.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #18595
    
----
commit 6d208f5e3bed657bedd5838595efa8d14ff3be33
Author: Burak Yavuz <[email protected]>
Date:   2017-07-11T00:00:53Z

    create distinction between read-only and read-write state stores

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to