/** * Triggers a bulk assignment of the specified regions * * @param assignmentManager the Assignment Manger * @param regionInfos the list of regions to assign * @throws IOException if an error occurred during the assignment */ public static void assignRegions(final AssignmentManager assignmentManager, final List<HRegionInfo> regionInfos) throws IOException { try { assignmentManager.getRegionStates().createRegionStates(regionInfos); assignmentManager.assign(regionInfos); } catch (InterruptedException e) { LOG.error("Caught " + e + " during round-robin assignment"); InterruptedIOException ie = new InterruptedIOException(e.getMessage()); ie.initCause(e); throw ie; } } }