This tool is used to get the progress of all current table transitions
during the online segment_2
function.
Currently, you can specify 3 dimensions (in the conf file) to view the results, you can specify one of them individually, or you can customize the combination (that is, specify multiple at the same time).
We use MySQLdb python lib to fetch meta from FE, so you must install it.
You can get MySQLdb lib from https://pypi.python.org/pypi/MySQL-python, then you can install it as follows:
$ tar zxvf MySQL-python-*.tar.gz
$ cd MySQL-python-*
$ python setup.py build
$ python setup.py install
- Fill in the conf according to your cluster configuration, and specify the table or be you want to watch.
- Execute
python show_segment_status.py
-
If you want to watch the process of databases named
xxx
,yyy
, you can specifydb_names = xxx,yyy
in conf file -
If you want to watch the process of tables named
xxx
,yyy
, you can specifytable_names = xxx,yyy
in conf file -
If you want to watch the process on be whose be_id is
xxxx
, you can specifybe_id = xxxx
in conf file
The first number is about segment v2, the latter one is the total count.
==========SUMMARY()===========
rowset_count: 289845 / 289845
rowset_disk_size: 84627551189 / 84627551189
rowset_row_count: 1150899153 / 1150899153
===========================================================
==========SUMMARY(table=xxxx)===========
rowset_count: 289845 / 289845
rowset_disk_size: 84627551189 / 84627551189
rowset_row_count: 1150899153 / 1150899153
===========================================================
==========SUMMARY(be=10003 )===========
rowset_count: 79650 / 79650
rowset_disk_size: 24473921575 / 24473921575
rowset_row_count: 331449328 / 331449328
===========================================================