Support Questions

Find answers, ask questions, and share your expertise

What is the best way to delete a range of rows (massively) from HBase?

Explorer

Hi everyone,

We have a HDP 2.6.4 cluster and I'd like to delete a range of rows (massively delete) from HBASE tables. What is the best approach to do that?

1 REPLY 1

Explorer

With Java you can add it to a List<Delete> and delete all at once by passing the list to the table.delete(List<>) function. If you mean you're deleting a ton of volume of data, may want to use some cron job of the jar associated with this delete.

If you mean through Hbase shell, I think that only has delete a whole row or delete a single cell. I don't think it has a range-delete function unless there is a way to combine a scan and a delete.