BrianGallew / cassandra_range_repair

python script to repair the primary range of a node in N discrete steps
MIT License
109 stars 47 forks source link

Updating nodetool gossipinfo regex for multiple DC #52

Closed agoetz00 closed 7 years ago

agoetz00 commented 8 years ago

We found that in our deployment that nodetool gossipinfo returns DC info formated 'DC:{digit}{digit}:{DC Name}'. The current regex accounts for a single digit. We updated the regex with '/d+' to account for the multiple digits.

Example: nodetool gossipinfo | grep DC DC:48:AS DC:51:WC DC:51:WC DC:49:WC DC:49:AS DC:49:AS DC:49:WC DC:49:AS DC:49:WC DC:48:AS DC:49:WC DC:48:AS DC:48:AS DC:49:WC DC:48:AS DC:51:WC DC:48:AS DC:51:AS DC:46:AS DC:51:AS DC:48:AS DC:48:AS DC:51:AS DC:49:AS DC:51:AS