Example usage for org.apache.commons.collections15.map MultiKeyMap put

List of usage examples for org.apache.commons.collections15.map MultiKeyMap put

Introduction

In this page you can find the example usage for org.apache.commons.collections15.map MultiKeyMap put.

Prototype

public V put(K key1, K key2, V value) 

Source Link

Document

For backwards compatibility, makes a call to the new varargs MultiKeyMap#putMultiKey

Usage

From source file:lcmc.data.CRMXML.java

/** Get resources that were removed but are in LRM. */
void parseLRM(final String unameLowerCase, final Node lrmNode, final List<String> resList,
        final Map<String, ResourceAgent> resourceTypeMap, final Map<String, Map<String, String>> parametersMap,
        final Map<String, Set<String>> inLRMList, final Set<String> orphanedList,
        final MultiKeyMap<String, Set<String>> failedClonesMap) {
    final Node lrmResourcesNode = getChildNode(lrmNode, "lrm_resources");
    final NodeList lrmResources = lrmResourcesNode.getChildNodes();
    for (int j = 0; j < lrmResources.getLength(); j++) {
        final Node rscNode = lrmResources.item(j);
        if ("lrm_resource".equals(rscNode.getNodeName())) {
            final String resId = getAttribute(rscNode, "id");
            final Pattern p = Pattern.compile("(.*):(\\d+)$");
            final Matcher m = p.matcher(resId);
            String crmId;//  ww  w.  j  av a 2 s .  com
            if (m.matches()) {
                crmId = m.group(1);
                Set<String> clones = failedClonesMap.get(unameLowerCase, crmId);
                if (clones == null) {
                    clones = new LinkedHashSet<String>();
                    failedClonesMap.put(unameLowerCase, crmId, clones);
                }
                clones.add(m.group(2));
            } else {
                crmId = resId;
            }
            if (!resourceTypeMap.containsKey(crmId)) {
                final String raClass = getAttribute(rscNode, "class");
                String provider = getAttribute(rscNode, "provider");
                if (provider == null) {
                    provider = ResourceAgent.HEARTBEAT_PROVIDER;
                }
                final String type = getAttribute(rscNode, "type");
                resourceTypeMap.put(crmId, getResourceAgent(type, provider, raClass));
                resList.add(crmId);
                parametersMap.put(crmId, new HashMap<String, String>());
                orphanedList.add(crmId);
            }
            /* it is in LRM */
            Set<String> inLRMOnHost = inLRMList.get(unameLowerCase);
            if (inLRMOnHost == null) {
                inLRMOnHost = new HashSet<String>();
                inLRMList.put(unameLowerCase, inLRMOnHost);
            }
            inLRMOnHost.add(crmId);
        }
    }
}

From source file:lcmc.data.CRMXML.java

/** Parses node, to get info like if it is in stand by. */
void parseNode(final String node, final Node nodeNode, final MultiKeyMap<String, String> nodeParametersMap) {
    /* <instance_attributes> */
    final Node instanceAttrNode = getChildNode(nodeNode, "instance_attributes");
    /* <nvpair...> */
    if (instanceAttrNode != null) {
        NodeList nvpairsRes;//from  w ww  .  ja  va  2  s.  c om
        if (Tools.versionBeforePacemaker(host)) {
            /* <attributtes> only til 2.1.4 */
            final Node attrNode = getChildNode(instanceAttrNode, "attributes");
            nvpairsRes = attrNode.getChildNodes();
        } else {
            nvpairsRes = instanceAttrNode.getChildNodes();
        }
        for (int j = 0; j < nvpairsRes.getLength(); j++) {
            final Node optionNode = nvpairsRes.item(j);
            if (optionNode.getNodeName().equals("nvpair")) {
                final String name = getAttribute(optionNode, "name");
                final String value = getAttribute(optionNode, "value");
                nodeParametersMap.put(node.toLowerCase(Locale.US), name, value);
            }
        }
    }
}

From source file:lcmc.data.CRMXML.java

/** Parses the transient attributes. */
private void parseTransientAttributes(final String uname, final Node transientAttrNode,
        final MultiKeyMap<String, String> failedMap, final MultiKeyMap<String, Set<String>> failedClonesMap,
        final Map<String, String> pingCountMap) {
    /* <instance_attributes> */
    final Node instanceAttrNode = getChildNode(transientAttrNode, "instance_attributes");
    /* <nvpair...> */
    if (instanceAttrNode != null) {
        NodeList nvpairsRes;//from   w  ww .  j av  a  2  s. co m
        if (Tools.versionBeforePacemaker(host)) {
            /* <attributtes> only til 2.1.4 */
            final Node attrNode = getChildNode(instanceAttrNode, "attributes");
            nvpairsRes = attrNode.getChildNodes();
        } else {
            nvpairsRes = instanceAttrNode.getChildNodes();
        }
        for (int j = 0; j < nvpairsRes.getLength(); j++) {
            final Node optionNode = nvpairsRes.item(j);
            if (optionNode.getNodeName().equals("nvpair")) {
                final String name = getAttribute(optionNode, "name");
                final String value = getAttribute(optionNode, "value");
                /* TODO: last-failure-" */
                if ("pingd".equals(name)) {
                    pingCountMap.put(uname, value);
                } else if (name.indexOf(FAIL_COUNT_PREFIX) == 0) {
                    final String resId = name.substring(FAIL_COUNT_PREFIX.length());
                    final String unameLowerCase = uname.toLowerCase(Locale.US);
                    failedMap.put(unameLowerCase, resId, value);
                    final Pattern p = Pattern.compile("(.*):(\\d+)$");
                    final Matcher m = p.matcher(resId);
                    if (m.matches()) {
                        final String crmId = m.group(1);
                        Set<String> clones = failedClonesMap.get(unameLowerCase, crmId);
                        if (clones == null) {
                            clones = new LinkedHashSet<String>();
                            failedClonesMap.put(unameLowerCase, crmId, clones);
                        }
                        clones.add(m.group(2));
                        failedMap.put(uname.toLowerCase(Locale.US), crmId, value);
                    }
                }
            }
        }
    }
}

From source file:lcmc.data.CRMXML.java

/** Returns CibQuery object with information from the cib node. */
CibQuery parseCibQuery(final String query) {
    final Document document = getXMLDocument(query);
    final CibQuery cibQueryData = new CibQuery();
    if (document == null) {
        Tools.appWarning("cib error: " + query);
        return cibQueryData;
    }//  w  w w. j  ava2s  .  co m
    /* get root <pacemaker> */
    final Node pcmkNode = getChildNode(document, "pcmk");
    if (pcmkNode == null) {
        Tools.appWarning("there is no pcmk node");
        return cibQueryData;
    }

    /* get fenced nodes */
    final Set<String> fencedNodes = new HashSet<String>();
    final Node fencedNode = getChildNode(pcmkNode, "fenced");
    if (fencedNode != null) {
        final NodeList nodes = fencedNode.getChildNodes();
        for (int i = 0; i < nodes.getLength(); i++) {
            final Node hostNode = nodes.item(i);
            if (hostNode.getNodeName().equals("node")) {
                final String host = getText(hostNode);
                if (host != null) {
                    fencedNodes.add(host.toLowerCase(Locale.US));
                }
            }
        }
    }

    /* get <cib> */
    final Node cibNode = getChildNode(pcmkNode, "cib");
    if (cibNode == null) {
        Tools.appWarning("there is no cib node");
        return cibQueryData;
    }
    /* Designated Co-ordinator */
    final String dcUuid = getAttribute(cibNode, "dc-uuid");
    //TODO: more attributes are here

    /* <configuration> */
    final Node confNode = getChildNode(cibNode, "configuration");
    if (confNode == null) {
        Tools.appWarning("there is no configuration node");
        return cibQueryData;
    }

    /* <rsc_defaults> */
    final Node rscDefaultsNode = getChildNode(confNode, "rsc_defaults");
    String rscDefaultsId = null;
    final Map<String, String> rscDefaultsParams = new HashMap<String, String>();
    final Map<String, String> rscDefaultsParamsNvpairIds = new HashMap<String, String>();
    if (rscDefaultsNode != null) {
        rscDefaultsId = parseRscDefaults(rscDefaultsNode, rscDefaultsParams, rscDefaultsParamsNvpairIds);
    }

    /* <op_defaults> */
    final Node opDefaultsNode = getChildNode(confNode, "op_defaults");
    final Map<String, String> opDefaultsParams = new HashMap<String, String>();
    if (opDefaultsNode != null) {
        parseOpDefaults(opDefaultsNode, opDefaultsParams);
    }

    /* <crm_config> */
    final Node crmConfNode = getChildNode(confNode, "crm_config");
    if (crmConfNode == null) {
        Tools.appWarning("there is no crm_config node");
        return cibQueryData;
    }

    /*      <cluster_property_set> */
    final Node cpsNode = getChildNode(crmConfNode, "cluster_property_set");
    if (cpsNode == null) {
        Tools.appWarning("there is no cluster_property_set node");
    } else {
        NodeList nvpairs;
        if (Tools.versionBeforePacemaker(host)) {
            /* <attributtes> only til 2.1.4 */
            final Node attrNode = getChildNode(cpsNode, "attributes");
            nvpairs = attrNode.getChildNodes();
        } else {
            nvpairs = cpsNode.getChildNodes();
        }
        final Map<String, String> crmConfMap = new HashMap<String, String>();
        /*              <nvpair...> */
        for (int i = 0; i < nvpairs.getLength(); i++) {
            final Node optionNode = nvpairs.item(i);
            if (optionNode.getNodeName().equals("nvpair")) {
                final String name = getAttribute(optionNode, "name");
                final String value = getAttribute(optionNode, "value");
                crmConfMap.put(name, value);
            }
        }
        cibQueryData.setCrmConfig(crmConfMap);
    }

    /* <nodes> */
    /* xml node with cluster node make stupid variable names, but let's
     * keep the convention. */
    String dc = null;
    final MultiKeyMap<String, String> nodeParametersMap = new MultiKeyMap<String, String>();
    final Node nodesNode = getChildNode(confNode, "nodes");
    final Map<String, String> nodeOnline = new HashMap<String, String>();
    final Map<String, String> nodeID = new HashMap<String, String>();
    if (nodesNode != null) {
        final NodeList nodes = nodesNode.getChildNodes();
        for (int i = 0; i < nodes.getLength(); i++) {
            final Node nodeNode = nodes.item(i);
            if (nodeNode.getNodeName().equals("node")) {
                /* TODO: doing nothing with the info, just getting the dc,
                 * for now.
                 */
                final String id = getAttribute(nodeNode, "id");
                final String uname = getAttribute(nodeNode, "uname");
                if (!nodeID.containsKey(uname)) {
                    nodeID.put(uname, id);
                }
                if (dcUuid != null && dcUuid.equals(id)) {
                    dc = uname;
                }
                parseNode(uname, nodeNode, nodeParametersMap);
                if (!nodeOnline.containsKey(uname.toLowerCase(Locale.US))) {
                    nodeOnline.put(uname.toLowerCase(Locale.US), "no");
                }
            }
        }
    }

    /* <resources> */
    final Node resourcesNode = getChildNode(confNode, "resources");
    if (resourcesNode == null) {
        Tools.appWarning("there is no resources node");
        return cibQueryData;
    }
    /*      <primitive> */
    final Map<String, Map<String, String>> parametersMap = new HashMap<String, Map<String, String>>();
    final Map<String, Map<String, String>> parametersNvpairsIdsMap = new HashMap<String, Map<String, String>>();
    final Map<String, ResourceAgent> resourceTypeMap = new HashMap<String, ResourceAgent>();
    final Set<String> orphanedList = new HashSet<String>();
    /* host -> inLRMList list */
    final Map<String, Set<String>> inLRMList = new HashMap<String, Set<String>>();
    final Map<String, String> resourceInstanceAttrIdMap = new HashMap<String, String>();
    final MultiKeyMap<String, String> operationsMap = new MultiKeyMap<String, String>();
    final Map<String, String> metaAttrsIdMap = new HashMap<String, String>();
    final Map<String, String> operationsIdMap = new HashMap<String, String>();
    final Map<String, Map<String, String>> resOpIdsMap = new HashMap<String, Map<String, String>>();
    /* must be linked, so that clone from group is before the group itself.
     */
    final Map<String, List<String>> groupsToResourcesMap = new LinkedHashMap<String, List<String>>();
    final Map<String, String> cloneToResourceMap = new HashMap<String, String>();
    final List<String> masterList = new ArrayList<String>();
    final MultiKeyMap<String, String> failedMap = new MultiKeyMap<String, String>();
    final MultiKeyMap<String, Set<String>> failedClonesMap = new MultiKeyMap<String, Set<String>>();
    final Map<String, String> pingCountMap = new HashMap<String, String>();
    groupsToResourcesMap.put("none", new ArrayList<String>());

    final NodeList primitivesGroups = resourcesNode.getChildNodes();
    final Map<String, String> operationsIdRefs = new HashMap<String, String>();
    final Map<String, String> operationsIdtoCRMId = new HashMap<String, String>();
    final Map<String, String> metaAttrsIdRefs = new HashMap<String, String>();
    final Map<String, String> metaAttrsIdToCRMId = new HashMap<String, String>();
    for (int i = 0; i < primitivesGroups.getLength(); i++) {
        final Node primitiveGroupNode = primitivesGroups.item(i);
        final String nodeName = primitiveGroupNode.getNodeName();
        if ("primitive".equals(nodeName)) {
            final List<String> resList = groupsToResourcesMap.get("none");
            parsePrimitive(primitiveGroupNode, resList, resourceTypeMap, parametersMap, parametersNvpairsIdsMap,
                    resourceInstanceAttrIdMap, operationsMap, metaAttrsIdMap, operationsIdMap, resOpIdsMap,
                    operationsIdRefs, operationsIdtoCRMId, metaAttrsIdRefs, metaAttrsIdToCRMId);
        } else if ("group".equals(nodeName)) {
            parseGroup(primitiveGroupNode, null, groupsToResourcesMap, parametersMap, resourceTypeMap,
                    parametersNvpairsIdsMap, resourceInstanceAttrIdMap, operationsMap, metaAttrsIdMap,
                    operationsIdMap, resOpIdsMap, operationsIdRefs, operationsIdtoCRMId, metaAttrsIdRefs,
                    metaAttrsIdToCRMId);
        } else if ("master".equals(nodeName) || "master_slave".equals(nodeName) || "clone".equals(nodeName)) {
            final NodeList primitives = primitiveGroupNode.getChildNodes();
            final String cloneId = getAttribute(primitiveGroupNode, "id");
            List<String> resList = groupsToResourcesMap.get(cloneId);
            if (resList == null) {
                resList = new ArrayList<String>();
                groupsToResourcesMap.put(cloneId, resList);
            }
            parseAttributes(primitiveGroupNode, cloneId, parametersMap, parametersNvpairsIdsMap,
                    resourceInstanceAttrIdMap, operationsMap, metaAttrsIdMap, operationsIdMap, resOpIdsMap,
                    operationsIdRefs, operationsIdtoCRMId, metaAttrsIdRefs, metaAttrsIdToCRMId, false);
            for (int j = 0; j < primitives.getLength(); j++) {
                final Node primitiveNode = primitives.item(j);
                if (primitiveNode.getNodeName().equals("primitive")) {
                    parsePrimitive(primitiveNode, resList, resourceTypeMap, parametersMap,
                            parametersNvpairsIdsMap, resourceInstanceAttrIdMap, operationsMap, metaAttrsIdMap,
                            operationsIdMap, resOpIdsMap, operationsIdRefs, operationsIdtoCRMId,
                            metaAttrsIdRefs, metaAttrsIdToCRMId);
                } else if (primitiveNode.getNodeName().equals("group")) {
                    parseGroup(primitiveNode, resList, groupsToResourcesMap, parametersMap, resourceTypeMap,
                            parametersNvpairsIdsMap, resourceInstanceAttrIdMap, operationsMap, metaAttrsIdMap,
                            operationsIdMap, resOpIdsMap, operationsIdRefs, operationsIdtoCRMId,
                            metaAttrsIdRefs, metaAttrsIdToCRMId);
                }
            }
            if (!resList.isEmpty()) {
                cloneToResourceMap.put(cloneId, resList.get(0));
                if ("master".equals(nodeName) || "master_slave".equals(nodeName)) {
                    masterList.add(cloneId);
                }
            }
        }
    }

    /* operationsRefs crm id -> crm id */
    final Map<String, String> operationsRefs = new HashMap<String, String>();
    for (final String crmId : operationsIdRefs.keySet()) {
        final String idRef = operationsIdRefs.get(crmId);
        operationsRefs.put(crmId, operationsIdtoCRMId.get(idRef));
    }

    /* mettaAttrsRefs crm id -> crm id */
    final Map<String, String> metaAttrsRefs = new HashMap<String, String>();
    for (final String crmId : metaAttrsIdRefs.keySet()) {
        final String idRef = metaAttrsIdRefs.get(crmId);
        metaAttrsRefs.put(crmId, metaAttrsIdToCRMId.get(idRef));
    }

    /* <constraints> */
    final Map<String, ColocationData> colocationIdMap = new LinkedHashMap<String, ColocationData>();
    final Map<String, List<ColocationData>> colocationRscMap = new HashMap<String, List<ColocationData>>();
    final Map<String, OrderData> orderIdMap = new LinkedHashMap<String, OrderData>();
    final Map<String, List<RscSet>> orderIdRscSetsMap = new HashMap<String, List<RscSet>>();
    final Map<String, List<RscSet>> colocationIdRscSetsMap = new HashMap<String, List<RscSet>>();
    final List<RscSetConnectionData> rscSetConnections = new ArrayList<RscSetConnectionData>();
    final Map<String, List<OrderData>> orderRscMap = new HashMap<String, List<OrderData>>();
    final Map<String, Map<String, HostLocation>> locationMap = new HashMap<String, Map<String, HostLocation>>();
    final Map<String, HostLocation> pingLocationMap = new HashMap<String, HostLocation>();
    final Map<String, List<String>> locationsIdMap = new HashMap<String, List<String>>();
    final MultiKeyMap<String, String> resHostToLocIdMap = new MultiKeyMap<String, String>();

    final Map<String, String> resPingToLocIdMap = new HashMap<String, String>();
    final Node constraintsNode = getChildNode(confNode, "constraints");
    if (constraintsNode != null) {
        final NodeList constraints = constraintsNode.getChildNodes();
        String rscString = "rsc";
        String rscRoleString = "rsc-role";
        String withRscString = "with-rsc";
        String withRscRoleString = "with-rsc-role";
        String firstString = "first";
        String thenString = "then";
        String firstActionString = "first-action";
        String thenActionString = "then-action";
        if (Tools.versionBeforePacemaker(host)) {
            rscString = "from";
            rscRoleString = "from_role";
            withRscString = "to";
            withRscRoleString = "to_role";
            firstString = "to";
            thenString = "from";
            firstActionString = "to_action";
            thenActionString = "action";
        }
        for (int i = 0; i < constraints.getLength(); i++) {
            final Node constraintNode = constraints.item(i);
            if (constraintNode.getNodeName().equals("rsc_colocation")) {
                final String colId = getAttribute(constraintNode, "id");
                final String rsc = getAttribute(constraintNode, rscString);
                final String withRsc = getAttribute(constraintNode, withRscString);
                if (rsc == null || withRsc == null) {
                    final List<RscSet> rscSets = new ArrayList<RscSet>();
                    parseRscSets(constraintNode, colId, null, rscSets, rscSetConnections);
                    colocationIdRscSetsMap.put(colId, rscSets);
                }
                final String rscRole = getAttribute(constraintNode, rscRoleString);
                final String withRscRole = getAttribute(constraintNode, withRscRoleString);
                final String score = getAttribute(constraintNode, SCORE_STRING);
                final ColocationData colocationData = new ColocationData(colId, rsc, withRsc, rscRole,
                        withRscRole, score);
                colocationIdMap.put(colId, colocationData);
                List<ColocationData> withs = colocationRscMap.get(rsc);
                if (withs == null) {
                    withs = new ArrayList<ColocationData>();
                }
                withs.add(colocationData);
                colocationRscMap.put(rsc, withs);
            } else if (constraintNode.getNodeName().equals("rsc_order")) {
                String rscFirst = getAttribute(constraintNode, firstString);
                String rscThen = getAttribute(constraintNode, thenString);
                final String ordId = getAttribute(constraintNode, "id");
                if (rscFirst == null || rscThen == null) {
                    final List<RscSet> rscSets = new ArrayList<RscSet>();
                    parseRscSets(constraintNode, null, ordId, rscSets, rscSetConnections);
                    orderIdRscSetsMap.put(ordId, rscSets);
                }
                final String score = getAttribute(constraintNode, SCORE_STRING);
                final String symmetrical = getAttribute(constraintNode, "symmetrical");
                String firstAction = getAttribute(constraintNode, firstActionString);
                String thenAction = getAttribute(constraintNode, thenActionString);
                final String type = getAttribute(constraintNode, "type");
                if (type != null && "before".equals(type)) {
                    /* exchange resoruces */
                    final String rsc = rscFirst;
                    rscFirst = rscThen;
                    rscThen = rsc;
                    final String act = firstAction;
                    firstAction = thenAction;
                    thenAction = act;
                }
                final OrderData orderData = new OrderData(ordId, rscFirst, rscThen, score, symmetrical,
                        firstAction, thenAction);
                orderIdMap.put(ordId, orderData);
                List<OrderData> thens = orderRscMap.get(rscFirst);
                if (thens == null) {
                    thens = new ArrayList<OrderData>();
                }
                thens.add(orderData);
                orderRscMap.put(rscFirst, thens);
            } else if ("rsc_location".equals(constraintNode.getNodeName())) {
                final String locId = getAttribute(constraintNode, "id");
                final String node = getAttribute(constraintNode, "node");
                final String rsc = getAttribute(constraintNode, "rsc");
                final String score = getAttribute(constraintNode, SCORE_STRING);
                final String role = null; // TODO

                List<String> locs = locationsIdMap.get(rsc);
                if (locs == null) {
                    locs = new ArrayList<String>();
                    locationsIdMap.put(rsc, locs);
                }
                Map<String, HostLocation> hostScoreMap = locationMap.get(rsc);
                if (hostScoreMap == null) {
                    hostScoreMap = new HashMap<String, HostLocation>();
                    locationMap.put(rsc, hostScoreMap);
                }
                if (node != null) {
                    resHostToLocIdMap.put(rsc, node.toLowerCase(Locale.US), locId);
                }
                if (score != null) {
                    hostScoreMap.put(node.toLowerCase(Locale.US), new HostLocation(score, "eq", null, role));
                }
                locs.add(locId);
                final Node ruleNode = getChildNode(constraintNode, "rule");
                if (ruleNode != null) {
                    final String score2 = getAttribute(ruleNode, SCORE_STRING);
                    final String booleanOp = getAttribute(ruleNode, "boolean-op");
                    // TODO: I know only "and", ignoring everything we
                    // don't know.
                    final Node expNode = getChildNode(ruleNode, "expression");
                    if (expNode != null && "expression".equals(expNode.getNodeName())) {
                        final String attr = getAttribute(expNode, "attribute");
                        final String op = getAttribute(expNode, "operation");
                        final String type = getAttribute(expNode, "type");
                        final String value = getAttribute(expNode, "value");
                        if ((booleanOp == null || "and".equals(booleanOp)) && "#uname".equals(attr)) {
                            hostScoreMap.put(value.toLowerCase(Locale.US),
                                    new HostLocation(score2, op, null, role));
                            resHostToLocIdMap.put(rsc, value.toLowerCase(Locale.US), locId);
                        } else if ((booleanOp == null || "and".equals(booleanOp)) && "pingd".equals(attr)) {
                            pingLocationMap.put(rsc, new HostLocation(score2, op, value, null));
                            resPingToLocIdMap.put(rsc, locId);
                        } else {
                            Tools.appWarning("could not parse rsc_location: " + locId);
                        }
                    }
                }
            }
        }
    }

    /* <status> */
    final Node statusNode = getChildNode(cibNode, "status");
    final Set<String> nodePending = new HashSet<String>();
    if (statusNode != null) {
        final String hbV = host.getHeartbeatVersion();
        /* <node_state ...> */
        final NodeList nodes = statusNode.getChildNodes();
        for (int i = 0; i < nodes.getLength(); i++) {
            final Node nodeStateNode = nodes.item(i);
            if ("node_state".equals(nodeStateNode.getNodeName())) {
                final String uname = getAttribute(nodeStateNode, "uname");
                final String id = getAttribute(nodeStateNode, "id");
                if (!id.equals(nodeID.get(uname))) {
                    Tools.appWarning("skipping " + uname + " " + id);
                }
                final String ha = getAttribute(nodeStateNode, "ha");
                final String join = getAttribute(nodeStateNode, "join");
                final String inCCM = getAttribute(nodeStateNode, "in_ccm");
                final String crmd = getAttribute(nodeStateNode, "crmd");
                if ("member".equals(join) && "true".equals(inCCM) && !"offline".equals(crmd)) {
                    nodeOnline.put(uname.toLowerCase(Locale.US), "yes");
                } else {
                    nodeOnline.put(uname.toLowerCase(Locale.US), "no");
                }
                if ("pending".equals(join)) {
                    nodePending.add(uname.toLowerCase(Locale.US));
                }
                final NodeList nodeStates = nodeStateNode.getChildNodes();
                /* transient attributes. */
                for (int j = 0; j < nodeStates.getLength(); j++) {
                    final Node nodeStateChild = nodeStates.item(j);
                    if ("transient_attributes".equals(nodeStateChild.getNodeName())) {
                        parseTransientAttributes(uname, nodeStateChild, failedMap, failedClonesMap,
                                pingCountMap);
                    }
                }
                final List<String> resList = groupsToResourcesMap.get("none");
                for (int j = 0; j < nodeStates.getLength(); j++) {
                    final Node nodeStateChild = nodeStates.item(j);
                    if ("lrm".equals(nodeStateChild.getNodeName())) {
                        parseLRM(uname.toLowerCase(Locale.US), nodeStateChild, resList, resourceTypeMap,
                                parametersMap, inLRMList, orphanedList, failedClonesMap);
                    }
                }
            }
        }
    }
    cibQueryData.setDC(dc);
    cibQueryData.setNodeParameters(nodeParametersMap);
    cibQueryData.setParameters(parametersMap);
    cibQueryData.setParametersNvpairsIds(parametersNvpairsIdsMap);
    cibQueryData.setResourceType(resourceTypeMap);
    cibQueryData.setInLRM(inLRMList);
    cibQueryData.setOrphaned(orphanedList);
    cibQueryData.setResourceInstanceAttrId(resourceInstanceAttrIdMap);

    cibQueryData.setColocationRsc(colocationRscMap);
    cibQueryData.setColocationId(colocationIdMap);

    cibQueryData.setOrderId(orderIdMap);
    cibQueryData.setOrderIdRscSets(orderIdRscSetsMap);
    cibQueryData.setColocationIdRscSets(colocationIdRscSetsMap);
    cibQueryData.setRscSetConnections(rscSetConnections);
    cibQueryData.setOrderRsc(orderRscMap);

    cibQueryData.setLocation(locationMap);
    cibQueryData.setPingLocation(pingLocationMap);
    cibQueryData.setLocationsId(locationsIdMap);
    cibQueryData.setResHostToLocId(resHostToLocIdMap);
    cibQueryData.setResPingToLocId(resPingToLocIdMap);
    cibQueryData.setOperations(operationsMap);
    cibQueryData.setOperationsId(operationsIdMap);
    cibQueryData.setOperationsRefs(operationsRefs);
    cibQueryData.setMetaAttrsId(metaAttrsIdMap);
    cibQueryData.setMetaAttrsRefs(metaAttrsRefs);
    cibQueryData.setResOpIds(resOpIdsMap);
    cibQueryData.setNodeOnline(nodeOnline);
    cibQueryData.setNodePending(nodePending);
    cibQueryData.setGroupsToResources(groupsToResourcesMap);
    cibQueryData.setCloneToResource(cloneToResourceMap);
    cibQueryData.setMasterList(masterList);
    cibQueryData.setFailed(failedMap);
    cibQueryData.setFailedClones(failedClonesMap);
    cibQueryData.setPingCount(pingCountMap);
    cibQueryData.setRscDefaultsId(rscDefaultsId);
    cibQueryData.setRscDefaultsParams(rscDefaultsParams);
    cibQueryData.setRscDefaultsParamsNvpairIds(rscDefaultsParamsNvpairIds);
    cibQueryData.setOpDefaultsParams(opDefaultsParams);
    cibQueryData.setFencedNodes(fencedNodes);
    return cibQueryData;
}