Examples of ClusterNode


Examples of de.jungblut.clustering.AgglomerativeClustering.ClusterNode

    assertEquals(1, clusters.get(0).size());
    assertEquals(2, clusters.get(1).size());
    assertEquals(3, clusters.get(2).size());
    assertEquals(6, clusters.get(3).size());

    ClusterNode clusterNode = clusters.get(0).get(0);
    traverse(clusterNode, 0, result);

    // check if all our points were in the right cluster levels
    assertEquals(0, result.size());
  }
View Full Code Here

Examples of net.sf.ehcache.cluster.ClusterNode

        private void doRejoin(RejoinRequest rejoinRequest) {
            if (rejoinRequest == null) {
                return;
            }
            final ClusterNode oldNodeReference = rejoinRequest.getRejoinOldNode();
            rejoinStatus.rejoinStarted();
            if (Thread.currentThread().isInterrupted()) {
                // clear interrupt status if set
                info("Clearing interrupt state of rejoin thread");
                Thread.currentThread().interrupted();
            }
            int rejoinNumber = rejoinCount.incrementAndGet();
            info("Starting Terracotta Rejoin (as client id: " + (oldNodeReference == null ? "null" : oldNodeReference.getId())
                    + " left the cluster) [rejoin count = " + rejoinNumber + "] ... ");
            rejoinListener.clusterRejoinStarted();
            clusteredInstanceFactory = createNewClusteredInstanceFactory(Collections.EMPTY_MAP);
            // now reinitialize all existing caches with the new instance factory, outside lock
            rejoinListener.clusterRejoinComplete();
View Full Code Here

Examples of net.sourceforge.jpowergraph.ClusterNode

        ArrayList <Edge> edges = new ArrayList <Edge> ();
       
        Node n1 = new NodeType1("Node 1");
        Node sn1 = new NodeType2("Node 2");
        Node sn2 = new NodeType2("Node 3");
        ClusterNode sn3 = new NodeType4("Node 4", 19);
        Node sn4 = new NodeType2("Node 5");
        Node sn5 = new NodeType2("Node 6");
        Node sn6 = new NodeType2("Multi Line\nNode Label");
        Node ssn1 = new NodeType3("Node 7");
        Node ssn2 = new NodeType3("Node 8");
View Full Code Here

Examples of org.apache.jackrabbit.core.cluster.ClusterNode

    public void refresh(boolean keepChanges) throws RepositoryException {
        // check sanity of this session
        sanityCheck();

        // JCR-1753: Ensure that we are up to date with cluster changes
        ClusterNode cluster = rep.getClusterNode();
        if (cluster != null && clusterSyncOnRefresh()) {
            try {
                cluster.sync();
            } catch (ClusterException e) {
                throw new RepositoryException(
                        "Unable to synchronize with the cluster", e);
            }
        }
View Full Code Here

Examples of org.apache.jackrabbit.core.cluster.ClusterNode

     *
     * @return clustered node
     */
    protected ClusterNode createClusterNode() throws RepositoryException {
        try {
            ClusterNode clusterNode = new ClusterNode();
            clusterNode.init(new ExternalEventListener());
            return clusterNode;
        } catch (Exception e) {
            throw new RepositoryException(e);
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.cluster.ClusterNode

     *
     * @return clustered node
     */
    private ClusterNode createClusterNode() throws RepositoryException {
        try {
            ClusterNode clusterNode = new ClusterNode();
            clusterNode.init(new ExternalEventListener());
            return clusterNode;
        } catch (Exception e) {
            throw new RepositoryException(e);
        }
    }
View Full Code Here

Examples of org.apache.s4.comm.topology.ClusterNode

        refreshCluster();
        this.topology.addListener(this);
    }

    private boolean connectTo(Integer partitionId) {
        ClusterNode clusterNode = partitionNodeMap.get(partitionId);

        if (clusterNode == null) {

            logger.error("No ClusterNode exists for partitionId " + partitionId);
            refreshCluster();
            return false;
        }

        try {
            ChannelFuture connectFuture = this.bootstrap.connect(new InetSocketAddress(clusterNode.getMachineName(),
                    clusterNode.getPort()));
            connectFuture.await();
            if (connectFuture.isSuccess()) {
                channels.add(connectFuture.getChannel());
                partitionChannelMap.forcePut(partitionId, connectFuture.getChannel());
                return true;
            }
        } catch (InterruptedException ie) {
            logger.error(String.format("Interrupted while connecting to %s:%d", clusterNode.getMachineName(),
                    clusterNode.getPort()));
            Thread.currentThread().interrupt();
        }
        return false;
    }
View Full Code Here

Examples of org.apache.slider.api.ClusterNode

      if (containers == null) {
        containers = new HashMap<>();
        map.put(node.role, containers);
      }
      Messages.RoleInstanceState pbuf = node.toProtobuf();
      ClusterNode clusterNode = ClusterNode.fromProtobuf(pbuf);
      containers.put(clusterNode.name, clusterNode);
    }
    return map;
  }
View Full Code Here

Examples of org.apache.slider.api.ClusterNode

      @Override
      public ClusterDescription getClusterStatus() {
        ClusterDescription cd = new ClusterDescription();
        cd.status = new HashMap<String, Object>();
        Map<String, Map<String, ClusterNode>> roleMap = new HashMap<>();
        ClusterNode cn1 = new ClusterNode(new MyContainerId(1));
        cn1.host = "FIRST_HOST";
        Map<String, ClusterNode> map1 = new HashMap<>();
        map1.put("FIRST_CONTAINER", cn1);
        ClusterNode cn2 = new ClusterNode(new MyContainerId(2));
        cn2.host = "SECOND_HOST";
        Map<String, ClusterNode> map2 = new HashMap<>();
        map2.put("SECOND_CONTAINER", cn2);
        ClusterNode cn3 = new ClusterNode(new MyContainerId(3));
        cn3.host = "THIRD_HOST";
        map2.put("THIRD_CONTAINER", cn3);

        roleMap.put("FIRST_ROLE", map1);
        roleMap.put("SECOND_ROLE", map2);
View Full Code Here

Examples of org.apache.slider.api.ClusterNode

    status.setConfigs(configs);
    hb.setComponentStatus(new ArrayList<>(Arrays.asList(status)));

    Map<String, Map<String, ClusterNode>> roleClusterNodeMap = new HashMap<>();
    Map<String, ClusterNode> container = new HashMap<>();
    ClusterNode cn1 = new ClusterNode(new MyContainerId(1));
    cn1.host = "HOST1";
    container.put("cid1", cn1);
    roleClusterNodeMap.put("HBASE_MASTER", container);

    ComponentInstanceState componentStatus = new ComponentInstanceState("HBASE_MASTER", "aid", "cid");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.