stepStatePath = file;
break;
}
if( stepStatePath == null )
throw new FlowException( "unable to find step state from distributed cache" );
LOG.info( "reading step state from local path: {}", stepStatePath );
Hfs temp = new Lfs( new TextLine( new Fields( "line" ) ), stepStatePath.toString() );
TupleEntryIterator reader = null;
try
{
reader = temp.openForRead( new HadoopFlowProcess( jobConf ) );
if( !reader.hasNext() )
throw new FlowException( "step state path is empty: " + temp.getIdentifier() );
return reader.next().getString( 0 );
}
catch( IOException exception )
{
throw new FlowException( "unable to find state path: " + temp.getIdentifier(), exception );
}
finally
{
try
{