/** * Create the application-instance specific temporary directory * in the DFS * * @param clustername name of the cluster * @return the path; this directory will already have been deleted */ public Path purgeAppInstanceTempFiles(String clustername) throws IOException { Path tmp = getTempPathForCluster(clustername); fileSystem.delete(tmp, true); return tmp; }
/** * Create the application-instance specific temporary directory * in the DFS * * @param clustername name of the cluster * @return the path; this directory will already have been deleted */ public Path purgeAppInstanceTempFiles(String clustername) throws IOException { Path tmp = getTempPathForCluster(clustername); fileSystem.delete(tmp, true); return tmp; }
/** * Create the application-instance specific temporary directory * in the DFS * * @param clustername name of the cluster * @param subdir application ID * @return the path; this directory will already have been created */ public Path createAppInstanceTempPath(String clustername, String subdir) throws IOException { Path tmp = getTempPathForCluster(clustername); Path instancePath = new Path(tmp, subdir); fileSystem.mkdirs(instancePath); return instancePath; }
/** * Create the application-instance specific temporary directory * in the DFS * * @param clustername name of the cluster * @param subdir application ID * @return the path; this directory will already have been created */ public Path createAppInstanceTempPath(String clustername, String subdir) throws IOException { Path tmp = getTempPathForCluster(clustername); Path instancePath = new Path(tmp, subdir); fileSystem.mkdirs(instancePath); return instancePath; }