Package backtype.storm.generated

Examples of backtype.storm.generated.TaskStats


            TaskError e = (TaskError) errors.get(i);
            newErrors.add(new ErrorInfo(e.getError(), e.getTimSecs()));
          }
        }
        BaseStatsData status = (BaseStatsData) heartbeat.getStats();
        TaskStats tkStatus = status.getTaskStats();
        int uptimeSecs = heartbeat.getUptimeSecs();
        TaskSummary taskSummary = new TaskSummary(taskId, componentId,
            host, np.getPort(), uptimeSecs, newErrors);
        taskSummary.set_stats(tkStatus);
        taskSummarys.add(taskSummary);
View Full Code Here


  public String getType() {
    return "spout";
  }

  public TaskStats getTaskStats() {
    return new TaskStats(common.get_emitted(), common.get_transferred(),
        getThirftstats());
  }
View Full Code Here

  public void setProcess_latencies(HashMap<Integer, Object> process_latencies) {
    this.process_latencies = process_latencies;
  }

  public TaskStats getTaskStats() {
    return new TaskStats(common.get_emitted(), common.get_transferred(),
        getThirftstats());
  }
View Full Code Here

    for (TaskSummary task : taskList) {
      ComponentTask componentTask = UIUtils.getComponentTask(task, topologyid);
     
      if (componentTask.getStatus().equals(ConfigExtension.TASK_STATUS_ACTIVE)) {
          TaskStats taskStats = task.get_stats();

          Map<String, Long> emitted = UIUtils.mergeStream(
              taskStats.get_emitted(), Long.valueOf(0));
          Map<String, Double> sendTps = UIUtils.mergeStream(
              taskStats.get_send_tps(), Double.valueOf(0));
          Map<String, Double> recvTps = UIUtils.mergeStream(
              taskStats.get_recv_tps(), Double.valueOf(0));
          Map<String, Long> acked = UIUtils.mergeStream(
              taskStats.get_acked(), Long.valueOf(0));
          Map<String, Long> failed = UIUtils.mergeStream(
              taskStats.get_failed(), Long.valueOf(0));
          Map<String, Double> process = UIUtils.mergeStream(
              taskStats.get_process_ms_avg(), Double.valueOf(0));
     
          componentTask.setEmitted(JStormUtils.formatValue(emitted
              .get(window)));
          componentTask.setSendTps(JStormUtils.formatValue(sendTps
              .get(window)));
View Full Code Here

    for (TaskSummary taskSummary : taskSummaries) {
      if (taskSummary.get_status().equals(ConfigExtension.TASK_STATUS_ACTIVE) == false)
        continue;
     
      TaskStats taskStats = taskSummary.get_stats();

      emittedList.add(taskStats.get_emitted().get(window));
      sendTpsList.add(taskStats.get_send_tps().get(window));
      recvTpsList.add(taskStats.get_recv_tps().get(window));
      ackedList.add(taskStats.get_acked().get(window));
      failedList.add(taskStats.get_failed().get(window));
      processList.add(taskStats.get_process_ms_avg().get(window));

    }

    Map<String, Long> emitted = JStormUtils.mergeMapList(emittedList);
    Map<String, Double> sendTps = JStormUtils.mergeMapList(sendTpsList);
View Full Code Here

    ret.put(StaticsType.acked, acked);
    ret.put(StaticsType.failed, failed);
    ret.put(StaticsType.process_latencies, process);

    for (TaskSummary taskSummary : taskSummaries) {
      TaskStats taskStats = taskSummary.get_stats();

      if (taskStats == null) {
        continue;
      }

      Map<String, Long> emittedMap = mergeStream(taskStats.get_emitted(),
          Long.valueOf(0));
      emitted.add(emittedMap.get(window));

      Map<String, Double> rendTpsMap = mergeStream(
          taskStats.get_send_tps(), Double.valueOf(0));
      sendTps.add(rendTpsMap.get(window));

      Map<String, Double> recvTpsMap = mergeStream(
          taskStats.get_recv_tps(), Double.valueOf(0));
      recvTps.add(recvTpsMap.get(window));

      Map<String, Long> ackedMap = mergeStream(taskStats.get_acked(),
          Long.valueOf(0));
      acked.add(ackedMap.get(window));

      Map<String, Long> failedMap = mergeStream(taskStats.get_failed(),
          Long.valueOf(0));
      failed.add(failedMap.get(window));

      Map<String, Double> processMap = mergeStream(
          taskStats.get_process_ms_avg(), Double.valueOf(0));
      process.add(processMap.get(window));
    }

    return ret;
View Full Code Here

    for (TaskSummary task : taskList) {
      ComponentTask componentTask = UIUtils.getComponentTask(task, topologyid);
     
      if (componentTask.getStatus().equals(ConfigExtension.TASK_STATUS_ACTIVE)) {
          TaskStats taskStats = task.get_stats();

          Map<String, Long> emitted = UIUtils.mergeStream(
              taskStats.get_emitted(), Long.valueOf(0));
          Map<String, Double> sendTps = UIUtils.mergeStream(
              taskStats.get_send_tps(), Double.valueOf(0));
          Map<String, Double> recvTps = UIUtils.mergeStream(
              taskStats.get_recv_tps(), Double.valueOf(0));
          Map<String, Long> acked = UIUtils.mergeStream(
              taskStats.get_acked(), Long.valueOf(0));
          Map<String, Long> failed = UIUtils.mergeStream(
              taskStats.get_failed(), Long.valueOf(0));
          Map<String, Double> process = UIUtils.mergeStream(
              taskStats.get_process_ms_avg(), Double.valueOf(0));   

          componentTask.setEmitted(JStormUtils.formatValue(emitted
              .get(window)));
          componentTask.setSendTps(JStormUtils.formatValue(sendTps
              .get(window)));
View Full Code Here

    for (TaskSummary taskSummary : taskSummaries) {
      if (taskSummary.get_status().equals(ConfigExtension.TASK_STATUS_ACTIVE) == false)
        continue;
     
      TaskStats taskStats = taskSummary.get_stats();

      emittedList.add(taskStats.get_emitted().get(window));
      sendTpsList.add(taskStats.get_send_tps().get(window));
      recvTpsList.add(taskStats.get_recv_tps().get(window));
      ackedList.add(taskStats.get_acked().get(window));
      failedList.add(taskStats.get_failed().get(window));
      processList.add(taskStats.get_process_ms_avg().get(window));

    }

    Map<String, Long> emitted = JStormUtils.mergeMapList(emittedList);
    Map<String, Double> sendTps = JStormUtils.mergeMapList(sendTpsList);
View Full Code Here

    }
    return ret;
  }

  public TaskStats getTaskStats() {
    TaskStats taskStats = new TaskStats();

    taskStats.set_emitted(get_emitted());
    taskStats.set_send_tps(get_send_tps());
    taskStats.set_recv_tps(get_recv_tps());
    taskStats.set_acked(get_acked());
    taskStats.set_failed(get_failed());
    taskStats.set_process_ms_avg(get_process_latencie());

    return taskStats;
  }
View Full Code Here

TOP

Related Classes of backtype.storm.generated.TaskStats

Copyright © 2018 www.massapicom. 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.