Examples of NimbusClient


Examples of backtype.storm.utils.NimbusClient

    init();
  }

  private void init() throws Exception {

    NimbusClient client = null;

    try {
      Map conf = UIUtils.readUiConfig();
     
      if(clusterName != null && !(clusterName.equals(""))) {
        UIUtils.getClusterInfoByName(conf, clusterName);
      }
     
      client = NimbusClient.getConfiguredClient(conf);

      TopologyInfo summ = client.getClient().getTopologyInfo(topologyid);
      StormTopology topology = client.getClient().getTopology(topologyid);

      List<TaskSummary> ts = summ.get_tasks();

      tsumm = UIUtils.topologySummary(summ);

      getComponents(ts, topology);

      tstats = topologyStatsTable(scom, bcom);

    } catch (Exception e) {
      LOG.error("Failed to get topology information,", e);
      throw e;
    } finally {

      if (client != null) {
        client.close();
      }
    }
  }
View Full Code Here

Examples of backtype.storm.utils.NimbusClient

  }

  @SuppressWarnings("rawtypes")
  private void init() throws TException, NotAliveException {

    NimbusClient client = null;

    try {
      Map conf = UIUtils.readUiConfig();
      if(clusterName != null  && !(clusterName.equals(""))) {
        UIUtils.getClusterInfoByName(conf, clusterName);
      }
      client = NimbusClient.getConfiguredClient(conf);

      TopologyInfo summ = client.getClient().getTopologyInfo(topologyid);
      StormTopology topology = client.getClient().getTopology(topologyid);
      TopologyMetricInfo topologyMetricInfo = client.getClient().getTopologyMetric(topologyid);

      String type = UIUtils.componentType(topology, componentid);

      List<TaskSummary> ts = UIUtils.getTaskList(summ.get_tasks(),
          componentid);
     
      topologyName = summ.get_name();

      coms = getComponentSummaries(summ, ts);

      cts = getComponentTasks(ts, window);

      comstats = getWinComponentStats(ts, window);

      getInputOutputSummary(ts, window);
      List<TaskMetricData> totoaltaskmetrics = topologyMetricInfo.get_task_metric_list();
      taskmetrics = getTaskMetricsList(totoaltaskmetrics);

    } catch (TException e) {
      LOG.error(e.getCause(), e);
      throw e;
    } catch (NotAliveException e) {
      LOG.error(e.getCause(), e);
      throw e;
    } finally {
      if (client != null) {
        client.close();
      }
    }

  }
View Full Code Here

Examples of backtype.storm.utils.NimbusClient

  }

  @SuppressWarnings("rawtypes")
  private void init() throws Exception {

    NimbusClient client = null;
    ClusterState cluster_state = null;
    try {
      LOG.info("MainPage init...");
      Map conf = UIUtils.readUiConfig();
     
      if(clusterName != null && !(clusterName.equals(""))) {
        UIUtils.getClusterInfoByName(conf, clusterName);
      }
     
      client = NimbusClient.getConfiguredClient(conf);
      summ = client.getClient().getClusterInfo();

      tsumm = UIUtils.topologySummary(summ.get_topologies());
      csumm = UIUtils.clusterSummary(summ, client, conf);
      ssumm = UIUtils.supervisorSummary(summ.get_supervisors());

      cluster_state = ZkTool.mk_distributed_cluster_state(client
          .getConf());
      slaves = getNimbusSlave(cluster_state, conf);

      zkServers = getZkServer(conf);
      zkPort = String.valueOf(conf.get(Config.STORM_ZOOKEEPER_PORT));

    } catch (Exception e) {
      String errorInfo = e.getMessage();
      if (errorInfo.indexOf("No alive nimbus") == -1) {
          LOG.error("Failed to get cluster information:", e);
          throw e;
      }
    } finally {
      if (client != null) {
        client.close();
      }
      if (cluster_state != null) {
        cluster_state.close();
      }
    }
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.