Skip to content

Commit ca5d155

Browse files
Replace all underscore flags in examples
Signed-off-by: Rohit Nayak <[email protected]>
1 parent 6a0588f commit ca5d155

File tree

13 files changed

+80
-80
lines changed

13 files changed

+80
-80
lines changed

examples/backups/stop_tablets.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
source ../common/env.sh
2121

2222
for tablet in 100 200 300; do
23-
if vtctldclient --action_timeout 1s --server localhost:15999 GetTablet zone1-$tablet >/dev/null 2>&1; then
23+
if vtctldclient --action-timeout 1s --server localhost:15999 GetTablet zone1-$tablet >/dev/null 2>&1; then
2424
# The zero tablet is up. Try to shutdown 0-2 tablet + mysqlctl
2525
for i in 0 1 2; do
2626
uid=$(($tablet + $i))

examples/common/env.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ if [ "${TOPO}" = "zk2" ]; then
5454
ZK_SERVER="localhost:21811,localhost:21812,localhost:21813"
5555
# shellcheck disable=SC2034
5656
#TODO: Remove underscore(_) flags in v25, replace them with dashed(-) notation
57-
TOPOLOGY_FLAGS="--topo_implementation zk2 --topo_global_server_address ${ZK_SERVER} --topo_global_root /vitess/global"
57+
TOPOLOGY_FLAGS="--topo-implementation zk2 --topo-global-server-address ${ZK_SERVER} --topo-global-root /vitess/global"
5858

5959
mkdir -p "${VTDATAROOT}/tmp"
6060
elif [ "${TOPO}" = "consul" ]; then
@@ -63,12 +63,12 @@ elif [ "${TOPO}" = "consul" ]; then
6363
CONSUL_HTTP_PORT=8500
6464
CONSUL_SERVER_PORT=8300
6565
#TODO: Remove underscore(_) flags in v25, replace them with dashed(-) notation
66-
TOPOLOGY_FLAGS="--topo_implementation consul --topo_global_server_address ${CONSUL_SERVER}:${CONSUL_HTTP_PORT} --topo_global_root vitess/global/"
66+
TOPOLOGY_FLAGS="--topo-implementation consul --topo-global-server-address ${CONSUL_SERVER}:${CONSUL_HTTP_PORT} --topo-global-root vitess/global/"
6767
mkdir -p "${VTDATAROOT}/consul"
6868
else
6969
ETCD_SERVER="localhost:2379"
7070
#TODO: Remove underscore(_) flags in v25, replace them with dashed(-) notation
71-
TOPOLOGY_FLAGS="--topo_implementation etcd2 --topo_global_server_address $ETCD_SERVER --topo_global_root /vitess/global"
71+
TOPOLOGY_FLAGS="--topo-implementation etcd2 --topo-global-server-address $ETCD_SERVER --topo-global-root /vitess/global"
7272

7373
mkdir -p "${VTDATAROOT}/etcd"
7474
fi

examples/common/scripts/mysqlctl-down.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ printf -v alias '%s-%010d' $cell $uid
2525
echo "Shutting down MySQL for tablet $alias..."
2626

2727
#TODO: Remove underscore(_) flags in v25, replace them with dashed(-) notation
28-
mysqlctl --tablet_uid $uid shutdown
28+
mysqlctl --tablet-uid $uid shutdown
2929

examples/common/scripts/mysqlctl-up.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ fi
3838
#TODO: Remove underscore(_) flags in v25, replace them with dashed(-) notation
3939
mysqlctl \
4040
--log_dir $VTDATAROOT/tmp \
41-
--tablet_uid $uid \
42-
--mysql_port $mysql_port \
41+
--tablet-uid $uid \
42+
--mysql-port $mysql_port \
4343
$action
4444

4545
echo -e "MySQL for tablet $alias is running!"

examples/common/scripts/vtctld-up.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ echo "Starting vtctld..."
2727
vtctld \
2828
$TOPOLOGY_FLAGS \
2929
--cell $cell \
30-
--service_map 'grpc-vtctl,grpc-vtctld' \
31-
--backup_storage_implementation file \
32-
--file_backup_storage_root $VTDATAROOT/backups \
30+
--service-map 'grpc-vtctl,grpc-vtctld' \
31+
--backup-storage-implementation file \
32+
--file-backup-storage-root $VTDATAROOT/backups \
3333
--log_dir $VTDATAROOT/tmp \
3434
--port $vtctld_web_port \
35-
--grpc_port $grpc_port \
36-
--pid_file $VTDATAROOT/tmp/vtctld.pid \
35+
--grpc-port $grpc_port \
36+
--pid-file $VTDATAROOT/tmp/vtctld.pid \
3737
--pprof-http \
3838
> $VTDATAROOT/tmp/vtctld.out 2>&1 &
3939

examples/common/scripts/vtgate-up.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,18 @@ echo "Starting vtgate..."
3030
vtgate \
3131
$TOPOLOGY_FLAGS \
3232
--log_dir $VTDATAROOT/tmp \
33-
--log_queries_to_file $VTDATAROOT/tmp/vtgate_querylog.txt \
33+
--log-queries-to-file $VTDATAROOT/tmp/vtgate_querylog.txt \
3434
--port $web_port \
35-
--grpc_port $grpc_port \
36-
--mysql_server_port $mysql_server_port \
37-
--mysql_server_socket_path $mysql_server_socket_path \
35+
--grpc-port $grpc_port \
36+
--mysql-server-port $mysql_server_port \
37+
--mysql-server-socket-path $mysql_server_socket_path \
3838
--cell $cell \
39-
--cells_to_watch $cell \
39+
--cells-to-watch $cell \
4040
--tablet-types-to-wait PRIMARY,REPLICA \
41-
--service_map 'grpc-vtgateservice' \
42-
--pid_file $VTDATAROOT/tmp/vtgate.pid \
43-
--enable_buffer \
44-
--mysql_auth_server_impl none \
41+
--service-map 'grpc-vtgateservice' \
42+
--pid-file $VTDATAROOT/tmp/vtgate.pid \
43+
--enable-buffer \
44+
--mysql-auth-server-impl none \
4545
--pprof-http \
4646
> $VTDATAROOT/tmp/vtgate.out 2>&1 &
4747

examples/common/scripts/vttablet-up.sh

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,21 @@ echo "Starting vttablet for $alias..."
3939
vttablet \
4040
$TOPOLOGY_FLAGS \
4141
--log_dir $VTDATAROOT/tmp \
42-
--log_queries_to_file $VTDATAROOT/tmp/$tablet_logfile \
42+
--log-queries-to-file $VTDATAROOT/tmp/$tablet_logfile \
4343
--tablet-path $alias \
44-
--tablet_hostname "$tablet_hostname" \
45-
--init_keyspace $keyspace \
46-
--init_shard $shard \
47-
--init_tablet_type $tablet_type \
48-
--health_check_interval 5s \
49-
--backup_storage_implementation file \
50-
--file_backup_storage_root $VTDATAROOT/backups \
51-
--restore_from_backup \
44+
--tablet-hostname "$tablet_hostname" \
45+
--init-keyspace $keyspace \
46+
--init-shard $shard \
47+
--init-tablet-type $tablet_type \
48+
--health-check-interval 5s \
49+
--backup-storage-implementation file \
50+
--file-backup-storage-root $VTDATAROOT/backups \
51+
--restore-from-backup \
5252
--port $port \
53-
--grpc_port $grpc_port \
54-
--service_map 'grpc-queryservice,grpc-tabletmanager,grpc-updatestream' \
55-
--pid_file $VTDATAROOT/$tablet_dir/vttablet.pid \
56-
--heartbeat_on_demand_duration=5s \
53+
--grpc-port $grpc_port \
54+
--service-map 'grpc-queryservice,grpc-tabletmanager,grpc-updatestream' \
55+
--pid-file $VTDATAROOT/$tablet_dir/vttablet.pid \
56+
--heartbeat-on-demand-duration=5s \
5757
--pprof-http \
5858
> $VTDATAROOT/$tablet_dir/vttablet.out 2>&1 &
5959

examples/compose/docker-compose.beginners.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ services:
6868
--cell $CELL \
6969
--service-map 'grpc-vtctl,grpc-vtctld' \
7070
--backup-storage-implementation file \
71-
--file_backup_storage_root /vt/vtdataroot/backups \
71+
--file-backup-storage-root /vt/vtdataroot/backups \
7272
--logtostderr=true \
7373
--port $WEB_PORT \
7474
--grpc-port $GRPC_PORT
@@ -98,10 +98,10 @@ services:
9898
--mysql-server-port $MYSQL_PORT \
9999
--mysql-auth-server-impl none \
100100
--cell $CELL \
101-
--cells_to_watch $CELL \
101+
--cells-to-watch $CELL \
102102
--tablet-types-to-wait PRIMARY,REPLICA \
103103
--service-map 'grpc-vtgateservice' \
104-
--enable_system_settings=true \
104+
--enable-system-settings=true \
105105
"]
106106
volumes:
107107
- ".:/script"

examples/compose/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ services:
138138
- -c
139139
- ' /vt/bin/vtctld --topo-implementation consul --topo-global-server-address consul1:8500
140140
--topo-global-root vitess/global --cell test
141-
--service-map ''grpc-vtctl,grpc-vtctld'' --backup-storage-implementation file --file_backup_storage_root
141+
--service-map ''grpc-vtctl,grpc-vtctld'' --backup-storage-implementation file --file-backup-storage-root
142142
/vt/vtdataroot/backups --logtostderr=true --port 8080 --grpc-port 15999 '
143143
depends_on:
144144
external_db_host:
@@ -155,7 +155,7 @@ services:
155155
- -c
156156
- '/script/run-forever.sh /vt/bin/vtgate --topo-implementation consul --topo-global-server-address
157157
consul1:8500 --topo-global-root vitess/global --logtostderr=true --port 8080 --grpc-port
158-
15999 --mysql-server-port 15306 --mysql-auth-server-impl none --cell test --cells_to_watch
158+
15999 --mysql-server-port 15306 --mysql-auth-server-impl none --cell test --cells-to-watch
159159
test --tablet-types-to-wait PRIMARY,REPLICA,RDONLY --service-map ''grpc-vtgateservice''
160160
--normalize-queries=true '
161161
depends_on:

examples/compose/vtcompose/docker-compose.test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ services:
154154
- ' /vt/bin/vtctld --topo-implementation consul --topo-global-server-address consul1:8500
155155
--topo-global-root vitess/global --cell test
156156
--service-map ''grpc-vtctl,grpc-vtctld'' --backup-storage-implementation file
157-
--file_backup_storage_root /vt/vtdataroot/backups --logtostderr=true --port
157+
--file-backup-storage-root /vt/vtdataroot/backups --logtostderr=true --port
158158
8080 --grpc-port 15999 '
159159
depends_on:
160160
external_db_host:
@@ -172,7 +172,7 @@ services:
172172
- '/script/run-forever.sh /vt/bin/vtgate --topo-implementation consul --topo-global-server-address
173173
consul1:8500 --topo-global-root vitess/global --logtostderr=true --port 8080
174174
--grpc-port 15999 --mysql-server-port 15306 --mysql-auth-server-impl none --cell
175-
test --cells_to_watch test --tablet-types-to-wait PRIMARY,REPLICA,RDONLY --service-map
175+
test --cells-to-watch test --tablet-types-to-wait PRIMARY,REPLICA,RDONLY --service-map
176176
''grpc-vtgateservice'' --normalize-queries=true '
177177
depends_on:
178178
- vtctld

0 commit comments

Comments
 (0)