Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
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.