def list_column_families(keyspace=None, contact_points=None, port=None, cql_user=None, cql_pass=None):
 where_clause = ("where keyspace_name = '{0}'".format(keyspace) if keyspace else '')
 query = 'select columnfamily_name\n                 from system.schema_columnfamilies\n                {0};'.format(where_clause)
 ret = {}
 try:
  ret = cql_query(query, contact_points, port, cql_user, cql_pass)
 except CommandExecutionError:
  log.critical('Could not list column families.')
  raise
 except BaseException as e:
  log.critical('Unexpected error while listing column families: {0}'.format(str(e)))
  raise
 return ret

def list_column_families ( keyspace = None , contact_points = None , port = None , cql_user = None , cql_pass = None ) : where_clause = ( "where keyspace_name = '{0}'" . format ( keyspace ) if keyspace else '' ) query = 'select columnfamily_name\n                 from system.schema_columnfamilies\n                {0};' . format ( where_clause ) ret = { } try : ret = cql_query ( query , contact_points , port , cql_user , cql_pass ) except CommandExecutionError : log . critical ( 'Could not list column families.' ) raise except BaseException as e : log . critical ( 'Unexpected error while listing column families: {0}' . format ( str ( e ) ) ) raise return ret
list column families in a cassandra cluster for all keyspaces or just the provided one .