private static void populateBlocks(Set<Distributable> uniqueBlocks,int noOfBlocksPerNode,List<Distributable> blockLst){
  Iterator<Distributable> blocks=uniqueBlocks.iterator();
  if (blockLst.size() == noOfBlocksPerNode) {
    return;
  }
  while (blocks.hasNext()) {
    Distributable block=blocks.next();
    blockLst.add(block);
    blocks.remove();
    if (blockLst.size() >= noOfBlocksPerNode) {
      break;
    }
  }
}

private static void populateBlocks ( Set < Distributable > uniqueBlocks , int noOfBlocksPerNode , List < Distributable > blockLst ) { Iterator < Distributable > blocks = uniqueBlocks . iterator ( ) ; if ( blockLst . size ( ) == noOfBlocksPerNode ) { return ; } while ( blocks . hasNext ( ) ) { Distributable block = blocks . next ( ) ; blockLst . add ( block ) ; blocks . remove ( ) ; if ( blockLst . size ( ) >= noOfBlocksPerNode ) { break ; } } }
the method populate the blocklst to be allocate to a specific node .
