Code example for Random

0
  static final int blockSize = 8192;
  static final int fileSize = 16384;
  static final int numDatanodes = 6;
 
 
  Random myrand = new Random();
  Path hostsFile;
  Path excludeFile;
   
  private void cleanupFile(FileSystem fileSys, Path name) throws IOException {
    assertTrue(fileSys.exists(name));
    fileSys.delete(name, true);
    assertTrue(!fileSys.exists(name));
  } 
 
  private void printDatanodeReport(DatanodeInfo[] info) {
    System.out.println("-------------------------------------------------");
    for (int i = 0; i < info.length; i++) {
      System.out.println(info[i].getDatanodeReport());
      System.out.println();