assertTrue( flowNodeStats.get( 0 ).getCounterValue( SliceCounters.Process_Duration ) != 0L );
assertEquals( 2, flowNodeStats.size() );
FlowNodeStats mapperNode = flowNodeStats.get( 0 );
FlowNodeStats reducerNode = flowNodeStats.get( 1 );
assertEquals( 4, mapperNode.getChildren().size() );
assertEquals( 1, reducerNode.getChildren().size() );
Collection<FlowSliceStats> children = reducerNode.getChildren();
for( FlowSliceStats flowSliceStats : children )
{
HadoopSliceStats hadoopSliceStats = (HadoopSliceStats) flowSliceStats;
if( hadoopSliceStats.getTaskIDNum() == 0 && hadoopSliceStats.getKind() == HadoopSliceStats.Kind.REDUCER )
assertTrue( hadoopSliceStats.getCounterValue( TestEnum.FIRST ) > 0 ); // in reducer
}
}
HadoopStepStats stats2 = (HadoopStepStats) flowStats2.getFlowStepStats().get( 0 );
assertNotNull( stats2.getID() );
assertNotNull( stats2.getJobID() );
// assertEquals( 2, stats2.getNumMapTasks() );
// assertEquals( 1, stats2.getNumReducerTasks() );
if( getPlatform().isUseCluster() )
{
List<FlowNodeStats> flowNodeStats = stats2.getFlowNodeStats();
assertEquals( 2, flowNodeStats.size() );
FlowNodeStats mapperNode = flowNodeStats.get( 0 );
FlowNodeStats reducerNode = flowNodeStats.get( 1 );
assertEquals( 4, mapperNode.getChildren().size() );
assertEquals( 1, reducerNode.getChildren().size() );
}
}