/** * 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; }
/** * 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; }
/** * 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; }
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 " + ", locNodeId=" + ctx.localNodeId() + ", rmtNodeId=" + rmtNode.id() + ", locGgfsName=" + locAttr.ggfsName() + ", rmtGgfsName=" + rmtAttr.ggfsName() + ']'); ", locNodeId=" + ctx.localNodeId() + ", rmtNodeId=" + rmtNode.id() + ", locGgfsName=" + locAttr.ggfsName() + ", rmtGgfsName=" + rmtAttr.ggfsName() + ']'); locAttr.blockSize(), rmtAttr.ggfsName()); locAttr.groupSize(), rmtAttr.ggfsName()); locAttr.metaCacheName(), rmtAttr.ggfsName()); locAttr.dataCacheName(), rmtAttr.ggfsName()); locAttr.defaultMode(), rmtAttr.ggfsName()); locAttr.pathModes(), rmtAttr.ggfsName()); locAttr.fragmentizerEnabled(), rmtAttr.ggfsName());
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 " + ", locNodeId=" + ctx.localNodeId() + ", rmtNodeId=" + rmtNode.id() + ", locGgfsName=" + locAttr.ggfsName() + ", rmtGgfsName=" + rmtAttr.ggfsName() + ']'); ", locNodeId=" + ctx.localNodeId() + ", rmtNodeId=" + rmtNode.id() + ", locGgfsName=" + locAttr.ggfsName() + ", rmtGgfsName=" + rmtAttr.ggfsName() + ']'); locAttr.blockSize(), rmtAttr.ggfsName()); locAttr.groupSize(), rmtAttr.ggfsName()); locAttr.metaCacheName(), rmtAttr.ggfsName()); locAttr.dataCacheName(), rmtAttr.ggfsName()); locAttr.defaultMode(), rmtAttr.ggfsName()); locAttr.pathModes(), rmtAttr.ggfsName()); locAttr.fragmentizerEnabled(), rmtAttr.ggfsName());