Created
May 24, 2012 02:14
-
-
Save farshidce/2779048 to your computer and use it in GitHub Desktop.
dereg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| validation : | |
| - replica index enabled and disabled | |
| - failover | |
| todo : | |
| - Replica Index ( Feature Tests ) | |
| - Aliaksey to explain when how replica index | |
| import os | |
| import sys | |
| import getopt | |
| import exceptions | |
| import struct | |
| import mc_bin_client | |
| import memcacheConstants | |
| from mc_bin_client import MemcachedClient | |
| from optparse import OptionParser | |
| parser = OptionParser() | |
| parser.add_option("-n", "--node",dest="host",default="127.0.0.1") | |
| parser.add_option("-p", "--port",dest="port",default="11210") | |
| options, args = parser.parse_args() | |
| mc = MemcachedClient(options.host,int(options.port)) | |
| tap = mc.stats("tap") | |
| tap_names = [] | |
| for t in tap: | |
| name_start = t.find("eq_tapq:") | |
| name_finish = t.rfind(":") | |
| if name_start >= 0 and name_finish > name_start: | |
| name = t[name_start+8:name_finish] | |
| tap_names.append(name) | |
| print name | |
| for tap_name in tap_names: | |
| print "deregsitering tap:",tap_name | |
| mc.deregister_tap_client(tap_name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment