GVR (GBase Visio Rsynctool) is the visual front end for Rsynctools, the tool that synchronises data between two clusters of the China-domestically developed GBase 8a MPP database from GBASE. This post covers the minimal quick deployment and the configuration files you are likely to touch from the gbase command line. The build used here is GBase_Visio_Rsynctool-9.5.4.5_build3.
Quick deployment: requirements
- Resource library: ships with an embedded SQLite database holding configuration and runtime state — no separate install needed.
- JRE: 1.8, bundled in the package.
- Python: 2.7.
- Memory: the main program uses 2 GB by default; a test machine should have at least 4 GB. Production sizing belongs in the official manual.
-
Port: 1526 serves the web UI. Change the
portparameter inapplication.ymlif it is taken. Check withlsof -i:<port>; empty output means the port is free.
[root@vm151 GBase_Visio_Rsynctool-9.5.4.5_build3]# lsof -i:1526
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 77456 gbase 36u IPv6 704590 0t0 TCP *:pdap-np (LISTEN)
Deploy, start, access
Unpack the tarball, then start the service from the unpacked directory and open port 1526 in a browser:
[gbase@vm151 gbase]$ tar xvf GBase_Visio_Rsynctool-9.5.4.5_build3.tar
GBase_Visio_Rsynctool-9.5.4.5_build3/
GBase_Visio_Rsynctool-9.5.4.5_build3/GBase_Visio_Rsynctool-9.5.4.5_build3.jar
...
[root@vm151 gbase]# cd GBase_Visio_Rsynctool-9.5.4.5_build3/
[root@vm151 GBase_Visio_Rsynctool-9.5.4.5_build3]# sh rsync.sh start
System is x86_64 arch
Start GBase_Visio_Rsynctool-9.5.4.5_build3 ...
Configuration layout
| Path | Purpose |
|---|---|
application.yml |
main configuration |
application-druid.yml |
resource-library datasource |
db |
embedded SQLite database |
deploy_tools |
deployment tools and manual |
GBase_Visio_Rsynctool-9.5.4.5_build3.jar |
main jar |
ipmapping |
IP mapping configuration |
jre_x86 / jre_aarch64 / jre_aarch64_orcl
|
bundled JREs |
logback.xml |
logging configuration |
rsync.sh |
main script |
rsynctool |
the sync tool GVR wraps |
sql |
init SQL for mysql / postgresql, plus schema changes between GVR versions |
application-druid.yml
The resource library stores GVR metadata — users, datasources, sync tasks and progress. It supports SQLite, mysql and postgresql, defaulting to the embedded SQLite:
# Data source configuration
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driverClassName: org.sqlite.JDBC
# driverClassName: com.mysql.cj.jdbc.Driver
# driverClassName: org.postgresql.Driver
druid:
# Primary data source
master:
url: jdbc:sqlite:db/sqlite.db?date_string_format=yyyy-MM-dd HH:mm:ss
username:
password:
# url: jdbc:mysql://192.168.3.87:3308/gbase_gvr_demo?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true
# username: root
# password: 864263
# url: jdbc:postgresql://192.168.88.82:5432/gbase_gvr_demo
# username: postgres
# password: postgres
# Initial connection count
initialSize: 5
# Minimum idle connections
minIdle: 10
# Maximum active connections
maxActive: 20
# Max wait for a connection (ms)
maxWait: 60000
# Interval (ms) for checking idle connections to close
timeBetweenEvictionRunsMillis: 60000
# Minimum time (ms) a connection may stay idle
minEvictableIdleTimeMillis: 300000
# Maximum time (ms) a connection may stay idle
maxEvictableIdleTimeMillis: 900000
# Query used to validate a connection
validationQuery: SELECT 1 FROM sys_user
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
statViewServlet:
enabled: true
# Whitelist; empty allows all access
allow:
url-pattern: /druid/*
# Console admin credentials
login-username: gbase
login-password: 761942
filter:
stat:
enabled: true
# Slow SQL logging
log-slow-sql: true
slow-sql-millis: 1000
merge-sql: false
wall:
config:
multi-statement-allow: true
The driverClassName and JDBC URL lines give working examples for all three databases. Swapping one is covered below.
logback.xml
log.path points at /tmp, so logs default to /tmp/sync with gvr-info.log and gvr-error.log; retention for the file_info and file_error appenders is configurable (60 days in the shipped file). Adjust both to the site's conventions. Only the documented values are kept here — the original post shows the full XML file.
IP mapping
IP mapping exists for the case where the two clusters' data-side networks cannot reach each other: business-side IPs on a 10.x segment are unique and mutually reachable across the customer network, while data-side IPs on a 192.x segment are isolated and may overlap between clusters. See the IP mapping section of the user manual for the actual rules.
Example: changing the public port
Edit the server block in application.yml from 1526 to an available port, here 8526:
# Runtime configuration
server:
# HTTP port, default 1526
port: 8526
[root@vm151 GBase_Visio_Rsynctool-9.5.4.5_build3]# grep port: application.yml
port: 8526
[root@vm151 GBase_Visio_Rsynctool-9.5.4.5_build3]# sh rsync.sh restart
Stop GBase_Visio_Rsynctool-9.5.4.5_build3
GBase_Visio_Rsynctool-9.5.4.5_build3 (pid:132689) exiting...
GBase_Visio_Rsynctool-9.5.4.5_build3 exited.
System is x86_64 arch
Start GBase_Visio_Rsynctool-9.5.4.5_build3 ...
[root@vm151 logs]# lsof -i:8526
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 136868 root 38u IPv6 932136 0t0 TCP *:8526 (LISTEN)
Startup takes a moment; once lsof shows the new port in LISTEN, the service is up.
Example: switching the resource library to mysql
Stop GVR, create the database and initialise the metadata tables:
mysql> create database gbase_gvr_demo;
Query OK, 1 row affected (0.02 sec)
mysql> use gbase_gvr_demo;
Database changed
mysql> source /opt/gbase/GBase_Visio_Rsynctool-9.5.4.5_build3/sql/gbase-gvr_mysql_4.2.sql
....
Query OK, 0 rows affected (0.00 sec)
show tables; then lists 35 tables (sync_config, sync_datasource, sys_user, task_job, and so on). Apply cumulative patches with source upgrade_4.4.sql; duplicate-key errors during this step can be ignored. Because the patch level is 4.4 and the current build is 4.5, the Deployment Guide section on SQLite upgrades may require extra schema changes — the 4.5 sample here did.
Then comment out the SQLite lines in application-druid.yml, enable the mysql driver and URL, and restart:
# Data source configuration
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
#driverClassName: org.sqlite.JDBC
driverClassName: com.mysql.cj.jdbc.Driver
# driverClassName: org.postgresql.Driver
druid:
# Primary data source
master:
#url: jdbc:sqlite:db/sqlite.db?date_string_format=yyyy-MM-dd HH:mm:ss
#username:
#password:
url: jdbc:mysql://localhost:3306/gbase_gvr_demo?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true
username: root
password: 864263
tail /tmp/sync/logs/gvr-error.log
Going forward, the useful split is that GVR keeps its own metadata in a small database while the actual synchronisation is handled by the wrapped rsynctool, so most day-one work is just picking a port and deciding whether the embedded SQLite is enough. Once a gbase cluster pair needs shared dashboards or longer retention, moving the resource library to mysql or postgresql is a config edit plus an init script, not a redeploy.
Top comments (0)