I created a Table namely DEMO_TABLE and inserted some data, but I wanted to clear out that table for that,
truncate "DEMO_TABLE"
But this removes all pre-splits given to that Table. Can Anybody explain this behavior?
The TRUNCATE statement deletes all data files from an Hadoop table. The table cannot be a Db2® local table or an HBase table.
HBase contains a shell using which you can communicate with HBase. HBase uses the Hadoop File System to store its data. It will have a master server and region servers. The data storage will be in the form of regions (tables).
If you are using HBase 0.98 or greater version, you can use truncate_preserve command in HBase shell. This will retain the previous region boundaries defined by the pre-split.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With