code: private int getBlockInfo(String[] argv, int i) throws IOException {
    	long blockId = Long.valueOf(argv[i++]);
    	LocatedBlockWithFileName locatedBlock = 
    			getDFS().getClient().getBlockInfo(blockId);
    
    	if (null == locatedBlock) {
    		System.err.println("Could not find the block with id : " + blockId);
    		return -1;
    	}
    	
    	StringBuilder sb = new StringBuilder();
    	sb.append("block: ")
    				.append(locatedBlock.getBlock()).append("\n")
    				.append("filename: ")
    				.append(locatedBlock.getFileName()).append("\n")
    				.append("locations: ");
    	
    	DatanodeInfo[] locs = locatedBlock.getLocations();
    	for (int k=0; k<locs.length; k++) {
    		if (k > 0) {
    			sb.append(" , ");
    		}
    		sb.append(locs[k].getHostName());
    	}
    				
    	System.out.println(sb.toString());  	
    	return 0;
    }
docs: Display the filename the block belongs to and its locations.
  
  @throws IOException