org.hackystat.telemetry.analyzer.reducer.impl
Class IssueReducer

java.lang.Object
  extended by org.hackystat.telemetry.analyzer.reducer.impl.IssueReducer
All Implemented Interfaces:
TelemetryReducer

public class IssueReducer
extends java.lang.Object
implements TelemetryReducer

Returns a single stream providing Issue counts.

Options:

  1. member: The project member whose commit counts are to be returned, or "*" for all members.

Author:
Shaoxuan Zhang, Philip Johnson

Constructor Summary
IssueReducer()
           
 
Method Summary
 TelemetryStreamCollection compute(org.hackystat.sensorbase.resource.projects.jaxb.Project project, org.hackystat.dailyprojectdata.client.DailyProjectDataClient dpdClient, org.hackystat.utilities.time.interval.Interval interval, java.lang.String[] options)
          Computes and returns the required telemetry streams object.
(package private)  java.lang.Long getIssuesData(org.hackystat.dailyprojectdata.client.DailyProjectDataClient dpdClient, org.hackystat.sensorbase.resource.projects.jaxb.Project project, org.hackystat.utilities.time.period.Day startDay, org.hackystat.utilities.time.period.Day endDay, java.lang.String member, java.lang.String issueStatus)
          Returns a Issue value for the specified time interval, or null if no SensorData.
(package private)  TelemetryStream getIssueStream(org.hackystat.dailyprojectdata.client.DailyProjectDataClient dpdClient, org.hackystat.sensorbase.resource.projects.jaxb.Project project, org.hackystat.utilities.time.interval.Interval interval, java.lang.String member, java.lang.String issueStatus, java.lang.Object streamTagValue)
          Gets the issue telemetry stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IssueReducer

public IssueReducer()
Method Detail

compute

public TelemetryStreamCollection compute(org.hackystat.sensorbase.resource.projects.jaxb.Project project,
                                         org.hackystat.dailyprojectdata.client.DailyProjectDataClient dpdClient,
                                         org.hackystat.utilities.time.interval.Interval interval,
                                         java.lang.String[] options)
                                  throws TelemetryReducerException
Computes and returns the required telemetry streams object.

Specified by:
compute in interface TelemetryReducer
Parameters:
project - The project.
dpdClient - The DPD Client.
interval - The interval.
options - The optional parameters.
Returns:
Telemetry stream collection.
Throws:
TelemetryReducerException - If there is any error.

getIssueStream

TelemetryStream getIssueStream(org.hackystat.dailyprojectdata.client.DailyProjectDataClient dpdClient,
                               org.hackystat.sensorbase.resource.projects.jaxb.Project project,
                               org.hackystat.utilities.time.interval.Interval interval,
                               java.lang.String member,
                               java.lang.String issueStatus,
                               java.lang.Object streamTagValue)
                         throws java.lang.Exception
Gets the issue telemetry stream.

Parameters:
dpdClient - The DailyProjectData client we will contact for the data.
project - The project.
interval - The interval.
member - The member, or "*" for all members.
streamTagValue - The tag for the generated telemetry stream.
issueStatus - the status of the issues to be counted.
Returns:
The telemetry stream as required.
Throws:
java.lang.Exception - If there is any error.

getIssuesData

java.lang.Long getIssuesData(org.hackystat.dailyprojectdata.client.DailyProjectDataClient dpdClient,
                             org.hackystat.sensorbase.resource.projects.jaxb.Project project,
                             org.hackystat.utilities.time.period.Day startDay,
                             org.hackystat.utilities.time.period.Day endDay,
                             java.lang.String member,
                             java.lang.String issueStatus)
                       throws TelemetryReducerException
Returns a Issue value for the specified time interval, or null if no SensorData.

Parameters:
dpdClient - The DailyProjectData client we will use to get this data.
project - The project.
startDay - The start day (inclusive).
endDay - The end day (inclusive).
member - The member email, or "*" for all members.
issueStatus - The status of the issue, open or closed.
Returns:
The UnitTest count, or null if there is no UnitTest SensorData for that time period.
Throws:
TelemetryReducerException - If anything goes wrong.