Search in sources :

Example 6 with MetricShortId

use of com.google.api.services.dataflow.model.MetricShortId in project beam by apache.

the class CounterShortIdCacheTest method createWorkServiceState.

private List<WorkItemServiceState> createWorkServiceState(MetricShortId[]... counterIds) {
    List<WorkItemServiceState> states = new ArrayList<>();
    for (MetricShortId[] ids : counterIds) {
        WorkItemServiceState state = new WorkItemServiceState();
        List<MetricShortId> shortIds = new ArrayList<>();
        for (int i = 0; i < ids.length; i++) {
            shortIds.add(ids[i]);
        }
        state.setMetricShortId(shortIds);
        states.add(state);
    }
    return states;
}
Also used : ArrayList(java.util.ArrayList) WorkItemServiceState(com.google.api.services.dataflow.model.WorkItemServiceState) MetricShortId(com.google.api.services.dataflow.model.MetricShortId)

Aggregations

MetricShortId (com.google.api.services.dataflow.model.MetricShortId)6 WorkItemServiceState (com.google.api.services.dataflow.model.WorkItemServiceState)3 ReportWorkItemStatusRequest (com.google.api.services.dataflow.model.ReportWorkItemStatusRequest)2 ReportWorkItemStatusResponse (com.google.api.services.dataflow.model.ReportWorkItemStatusResponse)2 ArrayList (java.util.ArrayList)2 Test (org.junit.Test)2 CounterUpdate (com.google.api.services.dataflow.model.CounterUpdate)1 WorkItemStatus (com.google.api.services.dataflow.model.WorkItemStatus)1