/** {@inheritDoc} */ @Override public void active(boolean active) { cluster().active(active); }
/** */ private Collection<BaselineNode> baselineNodes() { Collection<ClusterNode> srvNodes = cluster().forServers().nodes(); ArrayList baselineNodes = new ArrayList(srvNodes.size()); for (ClusterNode clN : srvNodes) baselineNodes.add(clN); return baselineNodes; }
/** {@inheritDoc} */ @Override public boolean pingNode(String nodeId) { A.notNull(nodeId, "nodeId"); return cluster().pingNode(UUID.fromString(nodeId)); }
/** * Reconstructs object on unmarshalling. * * @return Reconstructed object. * @throws ObjectStreamException Thrown in case of unmarshalling error. */ protected Object readResolve() throws ObjectStreamException { try { return IgnitionEx.localIgnite().cluster().nodeLocalMap(); } catch (IllegalStateException e) { throw U.withCause(new InvalidObjectException(e.getMessage()), e); } finally { stash.remove(); } }
/** {@inheritDoc} */ @Override public boolean pingNodeByAddress(String host) { guard(); try { for (ClusterNode n : cluster().nodes()) if (n.addresses().contains(host)) return ctx.discovery().pingNode(n.id()); return false; } catch (IgniteCheckedException e) { throw U.convertException(e); } finally { unguard(); } }
info(">>> Map " + keysSize + " keys to " + grid.cluster().nodes().size() + " nodes " + iterations + " times in " + diff + "ms.");
ClusterMetricsMXBean metricsBean = new ClusterMetricsMXBeanImpl(cluster()); registerMBean("Kernal", metricsBean.getClass().getSimpleName(), metricsBean, ClusterMetricsMXBean.class);
/** * @throws Exception If failed. */ @Test public void testIoTestMessages() throws Exception { for (Ignite node : G.allGrids()) { IgniteKernal ignite = (IgniteKernal)node; List<ClusterNode> rmts = new ArrayList<>(ignite.cluster().forRemotes().nodes()); assertEquals(4, rmts.size()); for (ClusterNode rmt : rmts) { ignite.sendIoTest(rmt, new byte[1024], false); ignite.sendIoTest(rmt, new byte[1024], true); ignite.sendIoTest(rmts, new byte[1024], false); ignite.sendIoTest(rmts, new byte[1024], true); } } } }
/** {@inheritDoc} */ @Override public void active(boolean active) { cluster().active(active); }
/** */ private Collection<BaselineNode> baselineNodes() { Collection<ClusterNode> srvNodes = cluster().forServers().nodes(); ArrayList baselineNodes = new ArrayList(srvNodes.size()); for (ClusterNode clN : srvNodes) baselineNodes.add(clN); return baselineNodes; }
/** {@inheritDoc} */ @Override public boolean pingNode(String nodeId) { A.notNull(nodeId, "nodeId"); return cluster().pingNode(UUID.fromString(nodeId)); }
/** * Reconstructs object on unmarshalling. * * @return Reconstructed object. * @throws ObjectStreamException Thrown in case of unmarshalling error. */ protected Object readResolve() throws ObjectStreamException { try { return IgnitionEx.localIgnite().cluster().nodeLocalMap(); } catch (IllegalStateException e) { throw U.withCause(new InvalidObjectException(e.getMessage()), e); } finally { stash.remove(); } }
/** {@inheritDoc} */ @Override public boolean pingNodeByAddress(String host) { guard(); try { for (ClusterNode n : cluster().nodes()) if (n.addresses().contains(host)) return ctx.discovery().pingNode(n.id()); return false; } catch (IgniteCheckedException e) { throw U.convertException(e); } finally { unguard(); } }
ClusterMetricsMXBean metricsBean = new ClusterMetricsMXBeanImpl(cluster()); registerMBean("Kernal", metricsBean.getClass().getSimpleName(), metricsBean, ClusterMetricsMXBean.class);