ApiComponentInfo apiTargetComponentInfo =
apiTargetComponent.getApiComponent();
ComponentCategory targetComponentCategory =
ComponentCategory.valueOf(apiTargetComponentInfo
.getComponentCategory());
ComponentName componentName =
ComponentName.valueOf(apiTargetComponentInfo.getComponentName());
if (isNamenodeHa(allRoles, unRecogRoles)) {
if (componentName.isSecondaryNamenode()) {
continue;
}
} else {
if (componentName.isJournalnode() || componentName.isZkfc()) {
continue;
}
}
if (targetComponentCategory.isMaster()) {
masterRoles.add(componentName.toString());
}
if (targetComponentCategory.isSlave()) {
slaveRoles.add(componentName.toString());
}
}
if (componentCategory.isSlave()) {
for (String masterRole : masterRoles) {
if (!allRoles.contains(masterRole)) {