if (!F.eq(rmtAttr.ggfsName(), locAttr.ggfsName())) { if (F.eq(rmtAttr.metaCacheName(), locAttr.metaCacheName())) throw new GridException("Meta cache names should be different for different GGFS instances " + "configuration (fix configuration or set " + "-D" + GridSystemProperties.GG_SKIP_CONFIGURATION_CONSISTENCY_CHECK + "=true system " + "property) [metaCacheName=" + rmtAttr.metaCacheName() + ", locNodeId=" + ctx.localNodeId() + ", rmtNodeId=" + rmtNode.id() + ", locGgfsName=" + locAttr.ggfsName() + ", rmtGgfsName=" + rmtAttr.ggfsName() + ']'); if (F.eq(rmtAttr.dataCacheName(), locAttr.dataCacheName())) throw new GridException("Data cache names should be different for different GGFS instances " + "configuration (fix configuration or set " + "-D" + GridSystemProperties.GG_SKIP_CONFIGURATION_CONSISTENCY_CHECK + "=true system " + "property)[dataCacheName=" + rmtAttr.dataCacheName() + ", locNodeId=" + ctx.localNodeId() + ", rmtNodeId=" + rmtNode.id() + ", locGgfsName=" + locAttr.ggfsName() + ", rmtGgfsName=" + rmtAttr.ggfsName() + ']'); checkSame("Data block size", "BlockSize", rmtNode.id(), rmtAttr.blockSize(), locAttr.blockSize(), rmtAttr.ggfsName()); checkSame("Affinity mapper group size", "GrpSize", rmtNode.id(), rmtAttr.groupSize(), locAttr.groupSize(), rmtAttr.ggfsName()); checkSame("Meta cache name", "MetaCacheName", rmtNode.id(), rmtAttr.metaCacheName(), locAttr.metaCacheName(), rmtAttr.ggfsName());
/** * Check whether GGFS with the same name exists among provided attributes. * * @param attrs Attributes. * @return {@code True} in case GGFS with the same name exists among provided attributes */ private boolean sameGgfs(GridGgfsAttributes[] attrs) { if (attrs != null) { String ggfsName = name(); for (GridGgfsAttributes attr : attrs) { if (F.eq(ggfsName, attr.ggfsName())) return true; } } return false; }
attrVals.add(new GridGgfsAttributes( ggfsCfg.getName(), ggfsCfg.getBlockSize(),
/** * Check whether GGFS with the same name exists among provided attributes. * * @param attrs Attributes. * @return {@code True} in case GGFS with the same name exists among provided attributes */ private boolean sameGgfs(GridGgfsAttributes[] attrs) { if (attrs != null) { String ggfsName = name(); for (GridGgfsAttributes attr : attrs) { if (F.eq(ggfsName, attr.ggfsName())) return true; } } return false; }
attrVals.add(new GridGgfsAttributes( ggfsCfg.getName(), ggfsCfg.getBlockSize(),
if (!F.eq(rmtAttr.ggfsName(), locAttr.ggfsName())) { if (F.eq(rmtAttr.metaCacheName(), locAttr.metaCacheName())) throw new GridException("Meta cache names should be different for different GGFS instances " + "configuration (fix configuration or set " + "-D" + GG_SKIP_CONFIGURATION_CONSISTENCY_CHECK + "=true system " + "property) [metaCacheName=" + rmtAttr.metaCacheName() + ", locNodeId=" + ctx.localNodeId() + ", rmtNodeId=" + rmtNode.id() + ", locGgfsName=" + locAttr.ggfsName() + ", rmtGgfsName=" + rmtAttr.ggfsName() + ']'); if (F.eq(rmtAttr.dataCacheName(), locAttr.dataCacheName())) throw new GridException("Data cache names should be different for different GGFS instances " + "configuration (fix configuration or set " + "-D" + GG_SKIP_CONFIGURATION_CONSISTENCY_CHECK + "=true system " + "property)[dataCacheName=" + rmtAttr.dataCacheName() + ", locNodeId=" + ctx.localNodeId() + ", rmtNodeId=" + rmtNode.id() + ", locGgfsName=" + locAttr.ggfsName() + ", rmtGgfsName=" + rmtAttr.ggfsName() + ']'); checkSame("Data block size", "BlockSize", rmtNode.id(), rmtAttr.blockSize(), locAttr.blockSize(), rmtAttr.ggfsName()); checkSame("Affinity mapper group size", "GrpSize", rmtNode.id(), rmtAttr.groupSize(), locAttr.groupSize(), rmtAttr.ggfsName()); checkSame("Meta cache name", "MetaCacheName", rmtNode.id(), rmtAttr.metaCacheName(), locAttr.metaCacheName(), rmtAttr.ggfsName());
/** * Checks if given node is a GGFS node. * * @param node Node to check. * @return {@code True} if node has GGFS with this name, {@code false} otherwise. */ public boolean ggfsNode(GridNode node) { assert node != null; GridGgfsAttributes[] ggfs = node.attribute(ATTR_GGFS); if (ggfs != null) for (GridGgfsAttributes attrs : ggfs) if (F.eq(cfg.getName(), attrs.ggfsName())) return true; return false; }
/** * Checks if given node is a GGFS node. * * @param node Node to check. * @return {@code True} if node has GGFS with this name, {@code false} otherwise. */ public boolean ggfsNode(GridNode node) { assert node != null; GridGgfsAttributes[] ggfs = node.attribute(ATTR_GGFS); if (ggfs != null) for (GridGgfsAttributes attrs : ggfs) if (F.eq(cfg.getName(), attrs.ggfsName())) return true; return false; }