'Regions In Transition в java application

Please tell me what's wrong, I'm new to working with hbase. when creating regions in a java application for hbase, an error occurs below then.

Caused by: org.apache.hadoop.hbase.ipc.RemoteWithExtrasException(org.apache.hadoop.hbase.client.DoNotRetryRegionException): org.apache.hadoop.hbase.client.DoNotRetryRegionException: bc3ec95b447809887e3c198afe4d1084 is not OPEN; regionState={bc3ec95b447809887e3c198afe4d1084 state=CLOSING, ts=1651224527248, server=hbase-docker,16020,1651207907804}

Code as below:


byte[][] splits = getSplits(countSplits, countSlot);
        for (byte[] byteSplit : splits) {
            byte[] regionName = admin.getRegions(tableName).get(admin.getRegions(tableName).size() - 1).getRegionName();
            admin.splitRegionAsync(regionName, byteSplit);
        }

This code is executed and 1 region out of 20 required is created. After creating the first one, the error above occurs. What needs to be added? I hope for any help



Solution 1:[1]

The problem is solved by adding a waiting time between operations.

.....
admin.splitRegionAsync(regionName, byteSplit);
Thread.sleep(30000);
.....

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dark Morning