GitHub user jasonxh opened a pull request:

    https://github.com/apache/zeppelin/pull/1286

    [ZEPPELIN-1294] Implement one-way sync for notebook repos

    ### What is this PR for?
    Currently, if there are two notebook storages configured, the sync process 
treats them equally and can pull changes from either storage. This can cause 
confusions if there is a clear distinction between primary and secondary 
storages, and the primary storage is managed outside of Zeppelin itself, such 
as a local folder that's git controlled. If a notebook is deleted or reverted 
to an older version in the primary storage behind Zeppelin's back, the sync 
process will overwrite the change with data from the secondary storage, likely 
against the user's intention.
    
    The proposal is to enable the scenario with a one-way sync flag, where the 
primary storage is treated as the only source of truth and the secondary 
storage is merely a mirror of the primary.
    
    ### What type of PR is it?
    Improvement
    
    ### Todos
    
    ### What is the Jira issue?
    <https://issues.apache.org/jira/browse/ZEPPELIN-1294>
    
    ### How should this be tested?
    1. Setup two notebook storages through `ZEPPELIN_NOTEBOOK_STORAGE`, with 
the first is local file storage, i.e. 
`org.apache.zeppelin.notebook.repo.VFSNotebookRepo`. The second storage can be 
anything, e.g. `org.apache.zeppelin.notebook.repo.zeppelinhub.ZeppelinHubRepo`.
    2. Add `export ZEPPELIN_NOTEBOOK_ONE_WAY_SYNC=true` to `zeppelin-env.sh`.
    3. Start Zeppelin server.
    4. Delete a notebook directly from the notebook folder.
    5. Refresh notebooks from Zeppelin UI.
    6. Observe from the secondary storage that the notebook has been deleted.
    
    ### Screenshots (if appropriate)
    
    ### Questions:
    * Does the licenses files need update? No
    * Is there breaking changes for older versions? No
    * Does this needs documentation? Documentation for the new flag has been 
added to `install.md`
    


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

    $ git pull https://github.com/optimizely/zeppelin hao/one-way-sync

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

    https://github.com/apache/zeppelin/pull/1286.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 #1286
    
----
commit 566b0ed44541383079efeac0c8e754e549fa19cb
Author: Hao Xia <h...@optimizely.com>
Date:   2016-08-04T21:08:50Z

    Implement one-way sync for notebook repos

----


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to