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 2022/07/04 00:35:03 UTC
[zeppelin] branch master updated: [ZEPPELIN-5724] Provide config to disable version control. (#4391)
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 aaa98a6a7b [ZEPPELIN-5724] Provide config to disable version control. (#4391)
aaa98a6a7b is described below
commit aaa98a6a7bda461ff94c04b6b2eff82a98664e3e
Author: Guanhua Li <gu...@foxmail.com>
AuthorDate: Mon Jul 4 08:34:53 2022 +0800
[ZEPPELIN-5724] Provide config to disable version control. (#4391)
---
conf/zeppelin-site.xml.template | 6 ++++++
docs/setup/operation/configuration.md | 6 ++++++
.../main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java | 2 ++
.../src/main/java/org/apache/zeppelin/notebook/Notebook.java | 3 +++
4 files changed, 17 insertions(+)
diff --git a/conf/zeppelin-site.xml.template b/conf/zeppelin-site.xml.template
index fea2da568f..4ee200b995 100755
--- a/conf/zeppelin-site.xml.template
+++ b/conf/zeppelin-site.xml.template
@@ -91,6 +91,12 @@
<description>Enable collaborative mode</description>
</property>
+<property>
+ <name>zeppelin.notebook.versioned.mode.enable</name>
+ <value>true</value>
+ <description>Value to enable/disable version control support in Notes</description>
+</property>
+
<!-- Google Cloud Storage notebook storage -->
<!--
<property>
diff --git a/docs/setup/operation/configuration.md b/docs/setup/operation/configuration.md
index 9af7923503..e0c769202d 100644
--- a/docs/setup/operation/configuration.md
+++ b/docs/setup/operation/configuration.md
@@ -469,6 +469,12 @@ Sources descending by priority:
<td>50</td>
<td>Threshold for the number of notes in the cache before an eviction occurs.</td>
</tr>
+ <tr>
+ <td><h6 class="properties">ZEPPELIN_NOTEBOOK_VERSIONED_MODE_ENABLE</h6></td>
+ <td><h6 class="properties">zeppelin.notebook.versioned.mode.enable</h6></td>
+ <td>true</td>
+ <td>Value to enable/disable version control support in Notes.</td>
+ </tr>
</table>
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java
index 19c4de4b54..f251c3182a 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java
@@ -1097,6 +1097,8 @@ public class ZeppelinConfiguration {
ZEPPELIN_NOTEBOOK_GIT_REMOTE_ORIGIN("zeppelin.notebook.git.remote.origin", "origin"),
ZEPPELIN_NOTEBOOK_COLLABORATIVE_MODE_ENABLE("zeppelin.notebook.collaborative.mode.enable",
true),
+ ZEPPELIN_NOTEBOOK_VERSIONED_MODE_ENABLE("zeppelin.notebook.versioned.mode.enable",
+ true),
ZEPPELIN_NOTEBOOK_CRON_ENABLE("zeppelin.notebook.cron.enable", false),
ZEPPELIN_NOTEBOOK_CRON_FOLDERS("zeppelin.notebook.cron.folders", null),
ZEPPELIN_NOTEBOOK_MARKDOWN_ESCAPE_HTML("zeppelin.notebook.markdown.escape.html", true),
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Notebook.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Notebook.java
index 1081c4df03..e2d913dc79 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Notebook.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Notebook.java
@@ -778,6 +778,9 @@ public class Notebook {
}
public Boolean isRevisionSupported() {
+ if(!conf.getBoolean(ConfVars.ZEPPELIN_NOTEBOOK_VERSIONED_MODE_ENABLE)) {
+ return false;
+ }
if (notebookRepo instanceof NotebookRepoSync) {
return ((NotebookRepoSync) notebookRepo).isRevisionSupportedInDefaultRepo();
} else if (notebookRepo instanceof NotebookRepoWithVersionControl) {