hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/ozShell/TestOzoneShell.java
private String createTmpFile() throws Exception {
    // write a new file that used for putting key
    File tmpFile = new File(baseDir,
        "/testfile-" + UUID.randomUUID().toString());
    FileOutputStream randFile = new FileOutputStream(tmpFile);
    Random r = new Random();
    for (int x = 0; x < 10; x++) {
      char c = (char) (r.nextInt(26) + 'a');
      randFile.write(c);
    }
    randFile.close();

    return tmpFile.getAbsolutePath();
  }
/**
   * Create a temporary file used for putting key.
   * @return the created file's path string
   * @throws Exception
   */
Create a temporary file used for putting key.
@return the created file's path string
@throws Exception
Create a temporary file used for putting key . @return the created file ' s path string @throws Exception
private String createTmpFile() throws Exception {
    File tmpFile = new File(baseDir,
        "/testfile-" + UUID.randomUUID().toString());
    FileOutputStream randFile = new FileOutputStream(tmpFile);
    Random r = new Random();
    for (int x = 0; x < 10; x++) {
      char c = (char) (r.nextInt(26) + 'a');
      randFile.write(c);
    }
    randFile.close();
    return tmpFile.getAbsolutePath();
  }
private String createTmpFile ( ) throws Exception { File tmpFile = new File ( baseDir , "/testfile-" + UUID . randomUUID ( ) . toString ( ) ) ; FileOutputStream randFile = new FileOutputStream ( tmpFile ) ; Random r = new Random ( ) ; for ( int x = 0 ; x < 10 ; x ++ ) { char c = ( char ) ( r . nextInt ( 26 ) + 'a' ) ; randFile . write ( c ) ; } randFile . close ( ) ; return tmpFile . getAbsolutePath ( ) ; }
Create a temporary file used for putting key.
Create a temporary file used for putting key .
// write a new file that used for putting key