コード例 #1
0
 // ----------------------------------------------------------------------------------------
 public void handleCluster(String source, Cluster cluster) {
   System.out.println(
       "cluster ready, rowNames "
           + cluster.getRowNames().length
           + " columnNames "
           + cluster.getColumnNames().length);
   this.clusterName = cluster.getName();
   this.clusterRowNames = cluster.getRowNames();
   this.clusterColumnNames = cluster.getColumnNames();
   defaultSpecies = cluster.getSpecies();
 }
コード例 #2
0
  protected void createClustersTable() throws UnsupportedEncodingException {
    table().attr("cellpadding", "0", "cellspacing", "0", "border", "0", "class", "display");
    thead();
    tr();
    createThs("Name", "#Nodes", "Health");
    end();
    end();
    tbody();
    for (Cluster c : router.getClusterManager().getClusters()) {
      tr();
      td();
      createLink(c.getName(), "clusters", "show", createQueryString("cluster", c.getName()));
      end();

      createTds(
          String.valueOf(router.getClusterManager().getAllNodesByCluster(c.getName()).size()),
          getFormatedHealth(c.getName()));
      end();
    }
    end();
    end();
  }