flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobUtils.java
/**
	 * Creates a local storage directory for a blob service under the given parent directory.
	 *
	 * @param basePath
	 * 		base path, i.e. parent directory, of the storage directory to use (if <tt>null</tt> or
	 * 		empty, the path in <tt>java.io.tmpdir</tt> will be used)
	 *
	 * @return a new local storage directory
	 *
	 * @throws IOException
	 * 		thrown if the local file storage cannot be created or is not usable
	 */
Creates a local storage directory for a blob service under the given parent directory.
@param basePath
base path, i.e. parent directory, of the storage directory to use (if null or
empty, the path in java.io.tmpdir will be used)

@return a new local storage directory

@throws IOException
thrown if the local file storage cannot be created or is not usable
Creates a local storage directory for a blob service under the given parent directory . @param basePath base path i . e . parent directory of the storage directory to use ( if null or empty the path in java . io . tmpdir will be used ) @return a new local storage directory @throws IOException thrown if the local file storage cannot be created or is not usable
static File initLocalStorageDirectory(String basePath) throws IOException {
		File baseDir;
		if (StringUtils.isNullOrWhitespaceOnly(basePath)) {
			baseDir = new File(System.getProperty("java.io.tmpdir"));
		}
		else {
			baseDir = new File(basePath);
		}
		File storageDir;
		final int MAX_ATTEMPTS = 10;
		for(int attempt = 0; attempt < MAX_ATTEMPTS; attempt++) {
			storageDir = new File(baseDir, String.format(
					"blobStore-%s", UUID.randomUUID().toString()));
			if (storageDir.mkdirs()) {
				return storageDir;
			}
		}
		throw new IOException("Could not create storage directory for BLOB store in '" + baseDir + "'.");
	}
static File initLocalStorageDirectory ( String basePath ) throws IOException { File baseDir ; if ( StringUtils . isNullOrWhitespaceOnly ( basePath ) ) { baseDir = new File ( System . getProperty ( "java.io.tmpdir" ) ) ; } else { baseDir = new File ( basePath ) ; } File storageDir ; final int MAX_ATTEMPTS = 10 ; for ( int attempt = 0 ; attempt < MAX_ATTEMPTS ; attempt ++ ) { storageDir = new File ( baseDir , String . format ( "blobStore-%s" , UUID . randomUUID ( ) . toString ( ) ) ) ; if ( storageDir . mkdirs ( ) ) { return storageDir ; } } throw new IOException ( "Could not create storage directory for BLOB store in '" + baseDir + "'." ) ; }
Creates a local storage directory for a blob service under the given parent directory.
Creates a local storage directory for a blob service under the given parent directory .
// NOTE: although we will be using UUIDs, there may be collisions // Create the storage dir if it doesn't exist. Only return it when the operation was // successful. // max attempts exceeded to find a storage directory