Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.94.0
-
None
-
None
-
Reviewed
Description
in CreateTableHandler
for (int regionIdx = 0; regionIdx < this.newRegions.length; regionIdx++) {
HRegionInfo newRegion = this.newRegions[regionIdx];
// 1. Create HRegion
HRegion region = HRegion.createHRegion(newRegion,
this.fileSystemManager.getRootDir(), this.conf,
this.hTableDescriptor, null, false, true);
regionInfos.add(region.getRegionInfo());
if (regionIdx % batchSize == 0)
// 3. Close the new region to flush to disk. Close log file too.
region.close();
}
All the region will be create serially.
If we have thousands of regions, that will be a huge cost.
We can improve it by create the region in parallel