You can rename the cluster without deleting data by updating it’s name in the system.local table (but you have to do this for each node…)
cqlsh> UPDATE system.local SET cluster_name="test" where key='local';
# flush the sstables to persist the update.
bash $ ./nodetool flush
Finally you need to rename the cluster to the new name in cassandra.yaml (again on each node)