Parameters #
Cluster Ecosystem Tool Parameters #
SphereEx-Boot Command Line Parameters #
Cluster
Command | Meaning | Parameters |
---|---|---|
download | Download ShardingSphere-Proxy, Zookeeper, Database driver packages | –type [proxy\ | zk\ | driver] Option proxy or zk or driver –proxy-url TEXT Proxy download URL –zk-url TEXT Zookeeper download URL –driver-url TEXT Database driver download URL –output-dir TEXT Output directory, Default current directory –help Show this message and exit. |
init | Quickly initialize cluster configuration for operations | -n, –name TEXT name of cluster [required] –user TEXT install user –password TEXT install password –proxy-file PATH package file of proxy –proxy-conf-dir PATH config file directory of proxy –proxy-agent-conf-file PATH agent config file of proxy –proxy-depend-file PATH depend file of proxy, for example, a database driver, for example: –proxy-depend-file /root/mysql-connector-java-5.1.47.jar –proxy-install-dir TEXT install directory of proxy –proxy-port INTEGER start port of proxy –proxy-overwrite TEXT overwrite if install directory already exists –proxy-host TEXT proxy host IP, can be entered multiple times, for example: –proxy-host 10.0.1.1 –proxy-host 10.0.1.2 –zk-file PATH package file of ZooKeeper –zk-conf-file PATH zoo.cfg file of zookeeper –zk-install-dir TEXT install directory of zookeeper –zk-data-dir TEXT data directory of zookeeper –zk-port INTEGER clientPort of zookeeper –zk-overwrite TEXT overwrite if install directory already exists –zk-host TEXT ZooKeeper host IP, can be entered multiple times, for example: –zk-host 10.0.1.1 –zk-host 10.0.1.2 –download [all\ | proxy\ | zk\ | driver] Download related installation packages –proxy-url TEXT Proxy download URL –zk-url TEXT ZooKeeper download URL –driver-url TEXT Database driver download URL –help Show this message and exit. |
install | Install the cluster (proxy or zk) based on the configuration file | -n, –name TEXT Cluster name [required] –host TEXT Host and port value. For example: 127.0.0.1 Specify the machine for this IP, 127.0.0.1:3307 Specify the node for this IP port –force The existing installation directory will be overwritten –type [proxy\ | zk] Option proxy or zk –help Show this message and exit. |
list | Show the installed clusters | |
scale | Scale the proxy of the cluster by file or parameters | -n, –name TEXT Name of cluster to be expanded, Required -f, –file PATH Configuration file of cluster –host TEXT Deployment machine IP –port INTEGER Start port of proxy or zookeeper –install-dir TEXT Install directory of proxy or zookeeper –agent-conf-file PATH Proxy agent config file –overwrite [yes\ | no] Overwrite if install directory already exists –help Show this message and exit. |
start | Start the cluster’s proxy or zk | -n, –name TEXT Cluster name [required] –with-agent Is Flag, Start with agent –host TEXT Host and port value, For example 127.0.0.1 or 127.0.0.1:3307 –type [proxy | zk] Option proxy or zk –help Show this message and exit. |
status | View the status of the cluster’s proxy or zk | -n, –name TEXT Cluster name [required] –host TEXT Host and port value, For example 127.0.0.1 or 127.0.0.1:3307 –type [proxy\ | zk] Option proxy or zk –help Show this message and exit. |
stop | Stop the cluster or zk | -n, –name TEXT Cluster name [required] –host TEXT Host and port value, For example 127.0.0.1 or 127.0.0.1:3307 –type [proxy\ | zk] Option proxy or zk –help Show this message and exit. |
uninstall | Uninstall the cluster or zk | -n, –name TEXT Cluster name [required] –host TEXT Host and port value, For example 127.0.0.1 or 127.0.0.1:3307 –type [proxy\ | zk] Option proxy or zk –force Confirm forced uninstall –help Show this message and exit. |
Cluster Components
Command | Meaning | Parameters |
---|---|---|
install | Currently, only Prometheus can be installed | –type [prometheus] Specify component type, default prometheus -f, –file PATH Specify profile -t, –template Export configuration template –user TEXT Install user –password TEXT Install password –install-dir TEXT Install directory –package PATH Installation package –host TEXT Host IP –help Show this message and exit. |
uninstall | Currently, only Prometheus can be uninstalled | –type [prometheus] Specify component type, default prometheus –user TEXT Install user –password TEXT Install password –install-dir TEXT Installed directory –host TEXT Host IP –help Show this message and exit. |
Cluster Configuration Files
Command | Meaning | Parameters |
---|---|---|
add | Add cluster configuration file | -f, –file PATH Cluster configuration file [required] –force If a cluster with the same name exists, do you want to overwrite the configuration –help Show this message and exit. |
check | Check cluster configuration files, can choose -f or -n | -f, –file PATH Cluster configuration file -n, –name TEXT Cluster name –help Show this message and exit. |
delete | Delete cluster configuration file | –force Force delete configuration of cluster! –help Show this message and exit. |
info | Display the contents of the configuration file | -n, –name TEXT Cluster name [required] –detail flag, detail info of the cluster configuration –help Show this message and exit. |
template | Export all configuration templates or scale configuration templates | –type [full | scale] Option ‘full’ or ‘scale’ [required] –output TEXT Output to a file –help Show this message and exit. |
Images
Command | Meaning | Parameters |
---|---|---|
clone | Download dependencies | -r, –requirement Output spex dependent. -o, –output-dir PATH Output directory, Default current directory. –help Show this message and exit. |
Manage SphereEx-Console
Command | Meaning | Parameters |
---|---|---|
install | Install console | -c, –config PATH Console configuration file [required] -n, –name TEXT Console name [required] –help Show this message and exit. |
uninstall | Uninstall console | -n, –name TEXT Console name [required] –help Show this message and exit. |
list | List the installed console list | |
export | Export installation configuration file template | –output TEXT Output to the path –help Show this message and exit. |
backup | Backup the mysql library data used by console, save it to the console’s parent installation directory, and it will not be deleted because console is uninstalled | -n, –name TEXT Console name [required] –help Show this message and exit. |
Cluster Component Parameter Lists #
Parameters configured during the use of components
- Monitoring Center Startup Parameters
--web.listen-address=":{listen_port}" # Listening port
--config.my-cnf="{conf}" # Configuration file for the above content
- Monitoring Plugin zookeeper-exporter Startup Parameters
-bind-addr=":{listen_port}" # Listening port
-zookeeper="{zk_host}" # Host:port to monitor zk
- Monitoring Plugin Node_exporter Startup Parameters
--web.listen-address=":{listen_port} # Listening port
Cluster Parameter Lists
Name | Data Type | Description | Default Value | Dynamic |
---|---|---|---|---|
agent_plugins_enabled | boolean | Whether to enable agent plugin. TRUE/FALSE | TRUE | No |
kernel_executor_size | int | The size of the task processing thread pool. Each ShardingSphereDataSource uses a separate thread pool, and different data sources in the same JVM do not share thread pools. | infinite | No |
max_connections_size_per_query | int | The maximum number of connections that can be used in each database instance for a single query request. | 1 | Yes |
proxy_frontend_flush_threshold | int | Setting the IO refresh threshold for transferring the number of data entries in ShardingSphere-Proxy. | 128 | Yes |
proxy_backend_query_fetch_size | int | The number of data rows that Proxy interacts with the database each time (when using a cursor). A larger value may increase the memory usage of ShardingSphere Proxy. The default value is -1, which means it is set to the minimum value of the JDBC driver. | -1 | Yes |
proxy_frontend_executor_size | int | The number of threads in the Proxy front-end Netty thread pool, with a default value of 0 indicating that the Netty default value is used. | 0 | No |
proxy_frontend_max_connections | int | The maximum number of clients allowed to connect to Proxy, with a default value of 0 indicating no limit. | 0 | Yes |
proxy_default_port | String | Specify the default port through the configuration file of Proxy. | 3307 | No |
proxy_netty_backlog | int | Specify the default netty back_log parameter through the configuration file of Proxy. | 1024 | No |
proxy_frontend_database_protocol_type | String | Proxy front-end protocol type, supports MySQL, PostgreSQL, openGauss | "" | No |
proxy_instance_type | String | Proxy instance type, optional: Proxy, SphereEx:Proxy, Proxy represents cloud deployment type, SphereEx:Proxy represents local deployment type | Proxy | No |
sql_show | boolean | Whether to print SQL in the system log. Printing SQL can help developers quickly locate system problems. The log content includes: logical SQL, real SQL, and SQL parsing results. If this configuration is enabled, the log will use Topic ShardingSphere-SQL, and the system log level is INFO. | false | Yes |
sql_simple | boolean | Whether to print simple-style SQL in the system log. | false | Yes |
slow_query_log | boolean | Whether to enable slow query TRUE/FALSE | false | Yes |
long_query_time | int | Slow query threshold in ms | 10 | Yes |
general_query_log | boolean | Whether to enable full log (audit log) TRUE/FALSE | false | Yes |
system_log_level | String | System log level of the current computing node (proxy) DEBUG, INFO, WARN, ERROR | INFO | Yes |
system_log_pattern | String | System log format of the current computing node (proxy) Log format can refer to Logback Layouts | [%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %logger{36} - %msg%n | Yes |
storage_node_heartbeat_interval_milliseconds | int | Used to configure the interval for collecting storage node status, in milliseconds. If the configuration is equal to 0, the storage node status collection function is turned off. | 0 | Yes |
meta_data_consistency_enabled | boolean | Control whether to enable proxy DDL and RDL consistency updates | true | Yes |
proxy_meta_data_collector_enabled | boolean | Used to enable the metadata information collection of the timing task thread | TRUE | No |
cached_connections | int | Number of cached connections in the backend 0 Read-only | 0 | No |
check_table_metadata_enabled | boolean | Whether to check the structural consistency of shard metadata when the program starts and updates. | false | Yes |
cdc_decrypt_enabled | boolean | CDC transfers plaintext to the client | false | Yes |
cdc_server_port | String | CDC default port | 33071 | No |
ghost_ddl_auto_cutover | boolean | Online DDL switch mode when using shadow table execution, automatic switch mode. Disabled, manual COMMIT DDL is required to complete the switch | true | Yes |
ghost_ddl_drop_table | boolean | When using shadow table execution in Online DDL, whether to delete the original table after execution is completed | false | Yes |
ghost_ddl_row_threshold | String | Number of rows threshold for DDL trigger to execute using shadow table | 1000000 | Yes |
proxy_ddl_strategy | String | Execution mode of Online DDL. After consistency is enabled, it will enter the online process. Optional parameters: ONLINE, DIRECT, AUTO. ONLINE: Proxy intervenes and guarantees that ddl is executed online | ||
insert_select_batch_size | String | The number of data items executed by the insert select task at one time | 1000 | Yes |
proxy_frontend_ssl_enabled | boolean | Proxy frontend enables SSL/TLS. | false | No |
proxy_frontend_ssl_cert_file | String | X.509 certificate chain file in PEM format. When no certificate and private key files are set up, ShardingSphere-Proxy generates a temporary RSA key pair and a self-signed X.509 certificate. | "" | No |
proxy_frontend_ssl_key_file | String | PKCS#8 private key file in PEM format. | "" | No |
proxy_frontend_ssl_version | String | The SSL/TLS protocol to enable. Leave blank to use default value. | TLSv1.2,TLSv1.3 | No |
proxy_frontend_ssl_cipher | String | Cipher suites enabled in order of preference. Comma separated multiple cipher suites. Leave blank to use default value. | "" | No |
system_schema_metadata_enabled | boolean | Internal parameters, whether to automatically load system tables. | true | Yes |