/** * Create application log directories on all disks. * * @param appId the application ID * @param logDirs the target directories to create * @param user the user whose local cache directories should be initialized * @throws IOException if there's an issue initializing the application log * directories */ void createAppLogDirs(String appId, List<String> logDirs, String user) throws IOException { boolean appLogDirStatus = false; FsPermission appLogDirPerms = new FsPermission(getLogDirPermissions()); for (String rootLogDir : logDirs) { // create $log.dir/$appid Path appLogDir = new Path(rootLogDir, appId); try { createDir(appLogDir, appLogDirPerms, true, user); } catch (IOException e) { LOG.warn("Unable to create the app-log directory : " + appLogDir, e); continue; } appLogDirStatus = true; } if (!appLogDirStatus) { throw new IOException("Not able to initialize app-log directories " + "in any of the configured local directories for app " + appId); } }
boolean containerLogDirStatus = false; FsPermission containerLogDirPerms = new FsPermission(getLogDirPermissions()); for (String rootLogDir : logDirs) {