Skip to content

Instantly share code, notes, and snippets.

@PatrickCallaghan
Last active February 23, 2017 16:54
Show Gist options
  • Save PatrickCallaghan/b5d96f748a5246790a666f50a8ade169 to your computer and use it in GitHub Desktop.
Save PatrickCallaghan/b5d96f748a5246790a666f50a8ade169 to your computer and use it in GitHub Desktop.
for f in *Data.db;
do ~/dse/resources/cassandra/tools/bin/sstabledump -e $f >> out.log;
done;
sed $'s/,/\\\n/g' out.log | sort | uniq -c | grep -v '^ *1 ' | sort -nk1 > duplicate_keys.out
OR
for f in *Data.db;
do ~/dse/resources/cassandra/tools/bin/sstabledump -e $f >> out.log;
done;
sed $'s/,/\\\n/g' out.log | sort | uniq -c | grep -v 1 | sort -nk1 > duplicate_keys.out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment