In order to be aware of the convert process from AlphaRowset to BetaRowset, we need a mechanism to know the process of convert.
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).
Note
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
Steps
- 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
Example
-
If you want to watch the process of a table named
xxxx, you can specifytable_name = xxxxin conf file -
If you want to watch the process on be whose be_id is
xxxx, you can specifybe_id = xxxxin conf file
Output Example Format
==========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
===========================================================