You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by jo...@apache.org on 2021/10/07 08:23:36 UTC

[zeppelin] branch master updated: [ZEPPELIN-5549] GCS Notebook storage documentation corrections

This is an automated email from the ASF dual-hosted git repository.

jongyoul pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git


The following commit(s) were added to refs/heads/master by this push:
     new 8b22413  [ZEPPELIN-5549] GCS Notebook storage documentation corrections
8b22413 is described below

commit 8b2241305d06db8ada8853019beedc21cbb8990d
Author: llamasoft <ll...@rm-rf.email>
AuthorDate: Tue Oct 5 19:26:40 2021 -0400

    [ZEPPELIN-5549] GCS Notebook storage documentation corrections
    
    ### What is this PR for?
    The documentation surrounding notebook storage using Google Cloud Storage contains a number of small inaccuracies.  Additionally, the GCS notebook storage documentation link was missing from the main navigation bar.
    
    ### What type of PR is it?
    Documentation
    
    ### How should this be tested?
    * Ensure that new Google Cloud Storage entry appears in navigation menu and works correctly.
    
    ### Questions:
    * I noticed that the S3 storage documentation has similar inaccuracies regarding the notebook storage paths.  Should I go ahead and update those as well, or should those be handled as a separate issue?
    * If this PR looks good, could you kindly apply the 'hacktoberfest-accepted' label? 😅
    
    Author: llamasoft <ll...@rm-rf.email>
    
    Closes #4245 from llamasoft/ZEPPELIN-5549/gcs-notebook-docs and squashes the following commits:
    
    53743621d [llamasoft] Add GCS Storage to navigation menu
    f7469051b [llamasoft] Fix incorrect comment/uncommenting docs for GCS setup
    00beceb29 [llamasoft] Update GCS notebook storage path docs
---
 conf/zeppelin-site.xml.template                              |  2 +-
 docs/_includes/themes/zeppelin/_navigation.html              |  1 +
 docs/setup/storage/storage.md                                | 12 ++++++------
 .../org/apache/zeppelin/notebook/repo/GCSNotebookRepo.java   |  2 +-
 4 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/conf/zeppelin-site.xml.template b/conf/zeppelin-site.xml.template
index 3e7ce63..5b96312 100755
--- a/conf/zeppelin-site.xml.template
+++ b/conf/zeppelin-site.xml.template
@@ -98,7 +98,7 @@
   <value></value>
   <description>
     A GCS path in the form gs://bucketname/path/to/dir.
-    Notes are stored at {zeppelin.notebook.gcs.dir}/{notebook-id}/note.json
+    Notes are stored at {zeppelin.notebook.gcs.dir}/{notebook-name}_{notebook-id}.zpln
  </description>
 </property>
 
diff --git a/docs/_includes/themes/zeppelin/_navigation.html b/docs/_includes/themes/zeppelin/_navigation.html
index 4fb33bd..4599724 100644
--- a/docs/_includes/themes/zeppelin/_navigation.html
+++ b/docs/_includes/themes/zeppelin/_navigation.html
@@ -114,6 +114,7 @@
                 <li><a href="{{BASE_PATH}}/setup/storage/storage.html#notebook-storage-in-local-git-repository">Git Storage</a></li>
                 <li><a href="{{BASE_PATH}}/setup/storage/storage.html#notebook-storage-in-s3">S3 Storage</a></li>
                 <li><a href="{{BASE_PATH}}/setup/storage/storage.html#notebook-storage-in-azure">Azure Storage</a></li>
+                <li><a href="{{BASE_PATH}}/setup/storage/storage.html#notebook-storage-in-google-cloud-storage">Google Cloud Storage</a></li>
                 <li><a href="{{BASE_PATH}}/setup/storage/storage.html#notebook-storage-in-oss">OSS Storage</a></li>
                 <li><a href="{{BASE_PATH}}/setup/storage/storage.html#notebook-storage-in-mongodb">MongoDB Storage</a></li>
                 <li role="separator" class="divider"></li>
diff --git a/docs/setup/storage/storage.md b/docs/setup/storage/storage.md
index 2887bb5..dc85cba 100644
--- a/docs/setup/storage/storage.md
+++ b/docs/setup/storage/storage.md
@@ -321,18 +321,18 @@ First, choose a GCS path under which to store notebooks.
   <value></value>
   <description>
     A GCS path in the form gs://bucketname/path/to/dir.
-    Notes are stored at {zeppelin.notebook.gcs.dir}/{notebook-id}/note.json
+    Notes are stored at {zeppelin.notebook.gcs.dir}/{notebook-name}_{notebook-id}.zpln
  </description>
 </property>
 ```
 
-Then, initialize the `GCSNotebookRepo` class in the file **zeppelin-site.xml** by commenting the next property:
+Then, initialize the `GCSNotebookRepo` class in the file **zeppelin-site.xml** by uncommenting:
 
 ```xml
 <property>
   <name>zeppelin.notebook.storage</name>
-  <value>org.apache.zeppelin.notebook.repo.GitNotebookRepo</value>
-  <description>versioned notebook persistence layer implementation</description>
+  <value>org.apache.zeppelin.notebook.repo.GCSNotebookRepo</value>
+  <description>notebook persistence layer implementation</description>
 </property>
 ```
 
@@ -341,8 +341,8 @@ and commenting out:
 ```xml
 <property>
   <name>zeppelin.notebook.storage</name>
-  <value>org.apache.zeppelin.notebook.repo.GCSNotebookRepo</value>
-  <description>notebook persistence layer implementation</description>
+  <value>org.apache.zeppelin.notebook.repo.GitNotebookRepo</value>
+  <description>versioned notebook persistence layer implementation</description>
 </property>
 ```
 
diff --git a/zeppelin-plugins/notebookrepo/gcs/src/main/java/org/apache/zeppelin/notebook/repo/GCSNotebookRepo.java b/zeppelin-plugins/notebookrepo/gcs/src/main/java/org/apache/zeppelin/notebook/repo/GCSNotebookRepo.java
index 606a33a..529225a 100644
--- a/zeppelin-plugins/notebookrepo/gcs/src/main/java/org/apache/zeppelin/notebook/repo/GCSNotebookRepo.java
+++ b/zeppelin-plugins/notebookrepo/gcs/src/main/java/org/apache/zeppelin/notebook/repo/GCSNotebookRepo.java
@@ -111,7 +111,7 @@ public class GCSNotebookRepo implements NotebookRepo {
       this.basePath = Optional.empty();
     }
 
-    // Notes are stored at gs://bucketName/basePath/<note-id>/note.json
+    // Notes are stored at gs://bucketName/basePath/<note-name>_<note-id>.zpln
     if (basePath.isPresent()) {
       this.notePathPattern = Pattern.compile(
           "^" + Pattern.quote(basePath.get() + "/") + "(.+\\.zpln)$");