Created
August 16, 2013 00:42
-
-
Save davidstrauss/6246289 to your computer and use it in GitHub Desktop.
This file contains 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
import pycassa | |
sm = pycassa.system_manager.SystemManager('127.0.0.1:9160') | |
keyspaces = sm.list_keyspaces() | |
for keyspace in keyspaces: | |
if keyspace == 'system': | |
continue | |
cfs = sm.get_keyspace_column_families(keyspace) | |
for cfname, metadata in cfs.iteritems(): | |
for col in metadata.column_metadata: | |
if col.index_name is not None: | |
print('Dropping index {0}.{1}.{2}'.format(keyspace, cfname, col.name)) | |
sm.drop_index(keyspace, cfname, col.name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment