You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by gu...@apache.org on 2020/06/22 11:15:59 UTC

[pulsar-manager] branch master updated: Upgrade HerdDB to 0.16, Pulsar Client to 2.5.2, add demo config for diskless-cluster mode (#303)

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

guangning pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-manager.git


The following commit(s) were added to refs/heads/master by this push:
     new e9ebf5d  Upgrade HerdDB to 0.16, Pulsar Client to 2.5.2, add demo config for diskless-cluster mode (#303)
e9ebf5d is described below

commit e9ebf5d567930bdbefaaea1fb9bda99ef6898dc0
Author: Enrico Olivelli <eo...@gmail.com>
AuthorDate: Mon Jun 22 13:15:51 2020 +0200

    Upgrade HerdDB to 0.16, Pulsar Client to 2.5.2, add demo config for diskless-cluster mode (#303)
    
    ### Motivation
    
    Since HerdDB 0.16 you can store all of the data on BookKeeper, this is called "diskless-cluster" mode.
    So you will be able to run PulsarManager + HerdDB on a stateless pod, all of the data will be stored on the same BK+ZK cluster as your Pulsar installation.
    
    ### Modifications
    
    - Upgrade HerdDB to 0.16.1.
    - Upgrade Apache Pulsar Admin Client to 2.5.2 (that officially supports BK 4.10)
    - Use pulsar-client-admin-original instead of pulsar-client-admin, because pulsar-client-admin contains a shaded version of CirceChecksum library from BK that is not compatibile with BK 4.10, needed by HerdDB in order to run in diskless-cluster  mode.
    - Configure gradle to put application.properties inside pulsar-manager.tar, this way it is super easy to change the configuration of pulsar-manager backend without recompiling the package (no need to use Gradle for System administrator)
    - Add an example JDBC URI to boot HerdDB in diskless-cluster mode
    
    
    ### Verifying this change
    
    - [ ] Make sure that the change passes the `./gradlew build` checks.
---
 build.gradle                              | 10 +++++++++-
 gradle.properties                         |  4 ++--
 src/main/resources/application.properties |  3 +++
 3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/build.gradle b/build.gradle
index 0a0ff0b..017a109 100644
--- a/build.gradle
+++ b/build.gradle
@@ -78,6 +78,14 @@ dependencyManagement {
   applyMavenExclusions = false
 }
 
+distributions {
+    main {
+        contents {
+            from 'src/main/resources/application.properties'
+        }
+    }
+}
+
 distTar {
     archiveName "pulsar-manager.tar"
 }
@@ -110,7 +118,7 @@ dependencies {
     compile group: 'com.google.guava', name: 'guava', version: guavaVersion
     compile group: 'com.google.code.gson', name: 'gson', version: gsonVersion
     compile group: 'org.apache.pulsar', name: 'pulsar-common', version: pulsarVersion
-    compile group: 'org.apache.pulsar', name: 'pulsar-client-admin', version: pulsarVersion
+    compile group: 'org.apache.pulsar', name: 'pulsar-client-admin-original', version: pulsarVersion
     compile group: 'io.springfox', name: 'springfox-swagger2', version: swagger2Version
     compile group: 'io.springfox', name: 'springfox-swagger-ui', version: swaggeruiVersion
     compile group: 'org.apache.pulsar', name: 'pulsar-broker', version: brokerVersion
diff --git a/gradle.properties b/gradle.properties
index 4cdd321..75a726b 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -10,13 +10,13 @@ lombokVersion=1.18.10
 pageHelperVersion=1.2.4
 mockitoVersion=1.10.19
 guavaVersion=21.0
-pulsarVersion=2.4.2
+pulsarVersion=2.5.2
 swagger2Version=2.9.2
 swaggeruiVersion=2.9.2
 apiMockitoVersion=1.7.1
 mockitoJunit4Version=1.7.1
 gsonVersion=2.8.2
 postgresqlVersion=42.2.5
-herddbVersion=0.15.1
+herddbVersion=0.16.1
 brokerVersion=2.4.1
 commonsValidatorVersion=1.6
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 1e6be65..bdfd655 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -40,11 +40,14 @@ spring.datasource.driver-class-name=herddb.jdbc.Driver
 #spring.datasource.url=jdbc:herddb:local
 # HerdDB - start embedded server, data persisted on local disk (directory 'dbdata'), listening on localhost:7000
 spring.datasource.url=jdbc:herddb:server:localhost:7000?server.start=true&server.base.dir=dbdata
+# HerdDB - start embedded server 'diskless-cluster' mode, WAL and Data persisted on Bookies, Metadata on ZooKeeper in '/herd', listening on localhost:7000
+#spring.datasource.url=jdbc:herddb:zookeeper:localhost:2181?server.start=true&server.base.dir=dbdata&server.mode=diskless-cluster&server.node.id=localhost
 # HerdDB - connect to standalone server at localhost:7000
 #spring.datasource.url=jdbc:herddb:server:localhost:7000
 # HerdDB - connect to cluster, uses ZooKeeper for service discovery
 #spring.datasource.url=jdbc:herddb:zookeeper:localhost:2181/herd
 
+
 spring.datasource.schema=classpath:/META-INF/sql/herddb-schema.sql
 spring.datasource.username=sa
 spring.datasource.password=hdb