if( dagClient == null || dagStatus == null )
return false;
try
{
VertexStatus vertexStatus = dagClient.getVertexStatus( getID(), STATUS_GET_OPTS );
if( vertexStatus == null )
return false;
Progress progress = vertexStatus.getProgress();
totalTaskCount = progress.getTotalTaskCount();
runningTaskCount = progress.getRunningTaskCount();
succeededTaskCount = progress.getSucceededTaskCount();
failedTaskCount = progress.getFailedTaskCount();
killedTaskCount = progress.getKilledTaskCount();
int total = sliceStatsMap.size();
for( int i = total; i < totalTaskCount; i++ )
{
TezSliceStats sliceStats = new TezSliceStats( Util.createUniqueID(), this.getStatus() );
sliceStatsMap.put( sliceStats.getID(), sliceStats );
}
// a placeholder to simulate actual slice stats for now
Iterator<FlowSliceStats> iterator = sliceStatsMap.values().iterator();
for( int i = 0; i < runningTaskCount && iterator.hasNext(); i++ )
( (TezSliceStats) iterator.next() ).setStatus( Status.RUNNING );
for( int i = 0; i < succeededTaskCount && iterator.hasNext(); i++ )
( (TezSliceStats) iterator.next() ).setStatus( Status.SUCCESSFUL );
for( int i = 0; i < failedTaskCount && iterator.hasNext(); i++ )
( (TezSliceStats) iterator.next() ).setStatus( Status.FAILED );
for( int i = 0; i < killedTaskCount && iterator.hasNext(); i++ )
( (TezSliceStats) iterator.next() ).setStatus( Status.STOPPED );
List<String> diagnostics = vertexStatus.getDiagnostics();
for( String diagnostic : diagnostics )
LOG.info( "vertex diagnostics: {}", diagnostic );
return true;