DatanodeInfo [ ] getDatanodes ( DatanodeReportType type ) { ArrayList < DatanodeDescriptor > results = getDatanodeListForReport ( type ) ; DatanodeInfo [ ] arr = new DatanodeInfo [ results . size ( ) ] ; for ( int i = 0 ; i < arr . length ; i ++ ) { arr [ i ] = new DatanodeInfo ( results . get ( i ) ) ; } return arr ; }
Get all the datanodes of the given type