Created on 03-16-2016 03:11 AM - edited 09-16-2022 03:09 AM
Hello,
I would like to change my HBase table and add some splits for the keys that don't exists yet.
I tried the folowings without success :
split 'table_name', 'key_that_dont_exists_yet' alter 'table_name', {SPLITS=>['my_new_split1','my_new_split2']}
However, I have the felling that is not working. When I check the splits, I have the same splits as before in the browser and when I do a
hdfs dfs -ls /hbase/data/default/table_name
I also have no additional folders...
Note: I'm using CDH 5.3
Thank you!
Created 03-16-2016 05:54 AM
What's strange is that it worked when I did
cat file_with_all_split_cmmands|hbase shell
...
Alina
Created 03-16-2016 05:54 AM
What's strange is that it worked when I did
cat file_with_all_split_cmmands|hbase shell
...
Alina
Created on 09-08-2016 02:36 AM - edited 09-08-2016 02:55 AM
Hi,
I'm using CDH 5.5.2. So my version of HBase is not the same.
I did try the | thing into the hbase shell command.
I'm trying to "pre-split" an existing empty table. But the following command seems to not be correct for this version of HBase :
alter '<namespace>:<table_name>',{ SPLITS => ['value1','value2'] }
I get the following message, so I guess the "SPLITS" part is not taken into account :
Unknown argument ignored: SPLITS
Updating all regions with the new schema...
1/2 regions updated.
2/2 regions updated.
Done.
0 row(s) in 2.4780 seconds
Does someone knows the syntax for pre-splitting and already existing table (empty table) ?
For CDH 5.5.2, it use HBase 1.0.0 I think.
Created 09-08-2016 03:03 AM
After some more testing I found that the following command is working:
split '<namespace>:<table_name>', 'NEW_SPLIT_VALUE'
I just need to call it once per "pre-split" value I need.