The code from here down is nearly identical to getDeadBlobs. Please refactor into a common class that take SqlQuerySpec as argument. _Originally posted by @lightningrob in https://github.com/linkedin/ambry/pull/1646#r509659461_