You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by mo...@apache.org on 2017/01/08 11:10:14 UTC

zeppelin git commit: [ZEPPELIN-1825] Use versioned notebook storage by default

Repository: zeppelin
Updated Branches:
  refs/heads/master ae12ba31a -> 7764465b1


[ZEPPELIN-1825] Use versioned notebook storage by default

### What is this PR for?
Due to recent work on versioned notes under ZEPPELIN-1044, we can use by default Git storage which extends local storage. so the behaviour will be same as before with additional ability to use versioning out of box without configuring it.

### What type of PR is it?
Improvement |  Refactoring

### Todos
* [x] - change VFS to Git

### What is the Jira issue?
[ZEPPELIN-1825](https://issues.apache.org/jira/browse/ZEPPELIN-1825)

### How should this be tested?
start zeppelin and by default be able to use version control (if git client installed)

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: Khalid Huseynov <kh...@gmail.com>

This patch had conflicts when merged, resolved by
Committer: Lee moon soo <mo...@apache.org>

Closes #1844 from khalidhuseynov/default-git-repo and squashes the following commits:

ac23085 [Khalid Huseynov] update indtall.md table
7cb133c [Khalid Huseynov] add note in upgrade.md
cc3b541 [Khalid Huseynov] fix in zeppelin-site.xml
cb9e9fb [Khalid Huseynov] modify default storage to git repo


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/7764465b
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/7764465b
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/7764465b

Branch: refs/heads/master
Commit: 7764465b123d2a56c96f9b170b42487392e2dd45
Parents: ae12ba3
Author: Khalid Huseynov <kh...@gmail.com>
Authored: Fri Jan 6 22:35:46 2017 -0800
Committer: Lee moon soo <mo...@apache.org>
Committed: Sun Jan 8 03:10:10 2017 -0800

----------------------------------------------------------------------
 conf/zeppelin-site.xml.template                       | 14 +++++++-------
 docs/install/configuration.md                         |  4 ++--
 docs/install/install.md                               |  2 +-
 docs/install/upgrade.md                               |  3 ++-
 .../apache/zeppelin/conf/ZeppelinConfiguration.java   |  4 ++--
 .../zeppelin/notebook/repo/NotebookRepoSync.java      |  2 +-
 6 files changed, 15 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7764465b/conf/zeppelin-site.xml.template
----------------------------------------------------------------------
diff --git a/conf/zeppelin-site.xml.template b/conf/zeppelin-site.xml.template
index 08104c7..beaebc5 100755
--- a/conf/zeppelin-site.xml.template
+++ b/conf/zeppelin-site.xml.template
@@ -147,11 +147,11 @@
 </property>
 -->
 
-<!-- For versioning your local notebook storage using Git repository
+<!-- Notebook storage layer using local file system
 <property>
   <name>zeppelin.notebook.storage</name>
-  <value>org.apache.zeppelin.notebook.repo.GitNotebookRepo</value>
-  <description>notebook persistence layer implementation</description>
+  <value>org.apache.zeppelin.notebook.repo.VFSNotebookRepo</value>
+  <description>local notebook persistence layer implementation</description>
 </property>
 -->
 
@@ -159,15 +159,15 @@
 <!--
 <property>
   <name>zeppelin.notebook.storage</name>
-  <value>org.apache.zeppelin.notebook.repo.VFSNotebookRepo, org.apache.zeppelin.notebook.repo.zeppelinhub.ZeppelinHubRepo</value>
-  <description>two notebook persistence layers (local + ZeppelinHub)</description>
+  <value>org.apache.zeppelin.notebook.repo.GitNotebookRepo, org.apache.zeppelin.notebook.repo.zeppelinhub.ZeppelinHubRepo</value>
+  <description>two notebook persistence layers (versioned local + ZeppelinHub)</description>
 </property>
 -->
 
 <property>
   <name>zeppelin.notebook.storage</name>
-  <value>org.apache.zeppelin.notebook.repo.VFSNotebookRepo</value>
-  <description>notebook persistence layer implementation</description>
+  <value>org.apache.zeppelin.notebook.repo.GitNotebookRepo</value>
+  <description>versioned notebook persistence layer implementation</description>
 </property>
 
 <property>

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7764465b/docs/install/configuration.md
----------------------------------------------------------------------
diff --git a/docs/install/configuration.md b/docs/install/configuration.md
index 44e3148..7a87838 100644
--- a/docs/install/configuration.md
+++ b/docs/install/configuration.md
@@ -215,7 +215,7 @@ If both are defined, then the **environment variables** will take priority.
   <tr>
     <td>ZEPPELIN_NOTEBOOK_STORAGE</td>
     <td>zeppelin.notebook.storage</td>
-    <td>org.apache.zeppelin.notebook.repo.VFSNotebookRepo</td>
+    <td>org.apache.zeppelin.notebook.repo.GitNotebookRepo</td>
     <td>Comma separated list of notebook storage locations</td>
   </tr>
   <tr>
@@ -385,4 +385,4 @@ update your configuration with the obfuscated password :
 ```
 
 
-**Note:** After updating these configurations, Zeppelin server needs to be restarted.
\ No newline at end of file
+**Note:** After updating these configurations, Zeppelin server needs to be restarted.

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7764465b/docs/install/install.md
----------------------------------------------------------------------
diff --git a/docs/install/install.md b/docs/install/install.md
index 3b1ce47..c360538 100644
--- a/docs/install/install.md
+++ b/docs/install/install.md
@@ -56,7 +56,7 @@ Two binary packages are available on the [Apache Zeppelin Download Page](http://
 
   Unpack and follow [install additional interpreters](../manual/interpreterinstallation.html) to install interpreters. If you're unsure, just run `./bin/install-interpreter.sh --all` and install all interpreters.
 
-## Starting Apache Zeppelin 
+## Starting Apache Zeppelin
 
 #### Starting Apache Zeppelin from the Command Line
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7764465b/docs/install/upgrade.md
----------------------------------------------------------------------
diff --git a/docs/install/upgrade.md b/docs/install/upgrade.md
index 0b6f405..f310196 100644
--- a/docs/install/upgrade.md
+++ b/docs/install/upgrade.md
@@ -54,4 +54,5 @@ So, copying `notebook` and `conf` directory should be enough.
  - Usage of `ZEPPELIN_PORT` is not supported in ssl mode. Instead use `ZEPPELIN_SSL_PORT` to configure the ssl port. Value from `ZEPPELIN_PORT` is used only when `ZEPPELIN_SSL` is set to `false`.
  - The support on Spark 1.1.x to 1.3.x is deprecated.
  - From 0.7, we uses `pegdown` as the `markdown.parser.type` option for the `%md` interpreter. Rendered markdown might be different from what you expected
- - From 0.7 note.json format has been changed to support multiple outputs in a paragraph. Zeppelin will automatically convert old format to new format. 0.6 or lower version can read new note.json format but output will not be displayed. For the detail, see [ZEPPELIN-212](http://issues.apache.org/jira/browse/ZEPPELIN-212) and [pullrequest](https://github.com/apache/zeppelin/pull/1658).
\ No newline at end of file
+ - From 0.7 note.json format has been changed to support multiple outputs in a paragraph. Zeppelin will automatically convert old format to new format. 0.6 or lower version can read new note.json format but output will not be displayed. For the detail, see [ZEPPELIN-212](http://issues.apache.org/jira/browse/ZEPPELIN-212) and [pull request](https://github.com/apache/zeppelin/pull/1658).
+ - From 0.7 note storage layer will utilize `GitNotebookRepo` by default instead of `VFSNotebookRepo` storage layer, which is an extension of latter one with versioning capabilities on top of it.

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7764465b/zeppelin-zengine/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java
index 001585d..9401854 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java
@@ -28,7 +28,7 @@ import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.configuration.XMLConfiguration;
 import org.apache.commons.configuration.tree.ConfigurationNode;
 import org.apache.commons.lang.StringUtils;
-import org.apache.zeppelin.notebook.repo.VFSNotebookRepo;
+import org.apache.zeppelin.notebook.repo.GitNotebookRepo;
 import org.apache.zeppelin.util.Util;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -582,7 +582,7 @@ public class ZeppelinConfiguration extends XMLConfiguration {
     ZEPPELIN_NOTEBOOK_AZURE_CONNECTION_STRING("zeppelin.notebook.azure.connectionString", null),
     ZEPPELIN_NOTEBOOK_AZURE_SHARE("zeppelin.notebook.azure.share", "zeppelin"),
     ZEPPELIN_NOTEBOOK_AZURE_USER("zeppelin.notebook.azure.user", "user"),
-    ZEPPELIN_NOTEBOOK_STORAGE("zeppelin.notebook.storage", VFSNotebookRepo.class.getName()),
+    ZEPPELIN_NOTEBOOK_STORAGE("zeppelin.notebook.storage", GitNotebookRepo.class.getName()),
     ZEPPELIN_NOTEBOOK_ONE_WAY_SYNC("zeppelin.notebook.one.way.sync", false),
     // whether by default note is public or private
     ZEPPELIN_NOTEBOOK_PUBLIC("zeppelin.notebook.public", true),

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7764465b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoSync.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoSync.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoSync.java
index 0ca7d69..73b25e9 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoSync.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoSync.java
@@ -51,7 +51,7 @@ public class NotebookRepoSync implements NotebookRepo {
   private static final String delDstKey = "delDstNoteIds";
 
   private static ZeppelinConfiguration config;
-  private static final String defaultStorage = "org.apache.zeppelin.notebook.repo.VFSNotebookRepo";
+  private static final String defaultStorage = "org.apache.zeppelin.notebook.repo.GitNotebookRepo";
 
   private List<NotebookRepo> repos = new ArrayList<>();
   private final boolean oneWaySync;