NodeGroupEntity nodeGroup, int instanceNum) {
Set<NodeGroupAssociation> associations = nodeGroup.getGroupAssociations();
if (associations != null && !associations.isEmpty()) {
AuAssert.check(associations.size() == 1,
"only support 1 group association now");
NodeGroupAssociation association = associations.iterator().next();
if (association.getAssociationType() == GroupAssociationType.STRICT) {
NodeGroupEntity refGroup =
clusterEntityMgr.findByName(nodeGroup.getCluster(),
association.getReferencedGroup());
AuAssert.check(refGroup != null, "shold not happens");
int hostNum = 1;
int refHostNum = refGroup.getDefineInstanceNum();
if (nodeGroup.getInstancePerHost() != null) {