* @throws java.io.IOException
*/
private List<EntityGroupInfo> entityGroupsToAssignWithServerName(
final List<Pair<EntityGroupInfo, ServerName>> entityGroupsInMeta)
throws IOException {
FServerManager serverManager = ((FMaster) this.server).getFServerManager();
List<EntityGroupInfo> entityGroups = new ArrayList<EntityGroupInfo>();
EntityGroupStates entityGroupStates = this.assignmentManager
.getEntityGroupStates();
for (Pair<EntityGroupInfo, ServerName> entityGroupLocation : entityGroupsInMeta) {
EntityGroupInfo egi = entityGroupLocation.getFirst();
ServerName sn = entityGroupLocation.getSecond();
if (!entityGroupStates.isEntityGroupInTransition(egi)
&& !entityGroupStates.isEntityGroupAssigned(egi)) {
if (this.retainAssignment && sn != null
&& serverManager.isServerOnline(sn)) {
this.assignmentManager.addPlan(egi.getEncodedName(),
new EntityGroupPlan(egi, null, sn));
}
entityGroups.add(egi);
} else {