.toString())) {
nodeGroupType = wordsInLine[1];
statehubUrlPrefix = wordsInLine[2];
envStr = wordsInLine[3];
NodeGroupSourceMetadata ngsm = new NodeGroupSourceMetadata(
dataSourceType, nodeGroupType,
statehubUrlPrefix, envStr);
List<String> nodeList = new ArrayList<String>();
boolean startTagParsed = false;
boolean endTagParsed = false;
while ((line = reader.readLine()) != null) {
if (line.equalsIgnoreCase(VarUtils.NODEGROUP_CONF_TAG_ADHOC_NODE_LIST_START)) {
startTagParsed = true;
} else if (line
.equalsIgnoreCase(VarUtils.NODEGROUP_CONF_TAG_ADHOC_NODE_LIST_END)) {
endTagParsed = true;
break;
} else if (startTagParsed == true
&& endTagParsed == false) {
// fixed bug: when fqdn has a space in the end.
// Assuming FQDN dont have a space in the middle
nodeList.add(line.trim());
}
}
// now should completes
if (startTagParsed == false || endTagParsed == false) {
models.utils.LogUtils.printLogError("ERROR in parsing");
}
// filtering duplicated nodes:
int removedDuplicatedNodeCount = AgentUtils
.removeDuplicateNodeList(nodeList);
models.utils.LogUtils.printLogNormal(" Removed duplicated node #: "
+ removedDuplicatedNodeCount);
models.utils.LogUtils.printLogNormal(" Total node count after removing duplicate : "
+ nodeList.size());
ngsm.addNodesToNodeList(nodeList);
if (nodeGroupType != null) {
adp.nodeGroupSourceMetadatas.put(nodeGroupType,
ngsm);