private void logDiskStatus(boolean newDiskFailure, boolean diskTurnedGood) { if (newDiskFailure) { String report = getDisksHealthReport(false); LOG.info("Disk(s) failed: " + report); } if (diskTurnedGood) { String report = getDisksHealthReport(true); LOG.info("Disk(s) turned good: " + report); } }
private void logDiskStatus(boolean newDiskFailure, boolean diskTurnedGood) { if (newDiskFailure) { String report = getDisksHealthReport(false); LOG.info("Disk(s) failed: " + report); } if (diskTurnedGood) { String report = getDisksHealthReport(true); LOG.info("Disk(s) turned good: " + report); } }
private void logDiskStatus(boolean newDiskFailure, boolean diskTurnedGood) { if (newDiskFailure) { String report = getDisksHealthReport(false); LOG.info("Disk(s) failed: " + report); } if (diskTurnedGood) { String report = getDisksHealthReport(true); LOG.info("Disk(s) turned good: " + report); } }
private void logDiskStatus(boolean newDiskFailure, boolean diskTurnedGood) { if (newDiskFailure) { String report = getDisksHealthReport(false); LOG.info("Disk(s) failed: " + report); } if (diskTurnedGood) { String report = getDisksHealthReport(true); LOG.info("Disk(s) turned good: " + report); } }
/** * @return the reporting string of health of the node */ String getHealthReport() { String scriptReport = (nodeHealthScriptRunner == null) ? "" : nodeHealthScriptRunner.getHealthReport(); if (scriptReport.equals("")) { return dirsHandler.getDisksHealthReport(false); } else { return scriptReport.concat(SEPARATOR + dirsHandler.getDisksHealthReport(false)); } }
/** * @return the reporting string of health of the node */ String getHealthReport() { String scriptReport = (nodeHealthScriptRunner == null) ? "" : nodeHealthScriptRunner.getHealthReport(); if (scriptReport.equals("")) { return dirsHandler.getDisksHealthReport(false); } else { return scriptReport.concat(SEPARATOR + dirsHandler.getDisksHealthReport(false)); } }
/** * @return the reporting string of health of the node */ String getHealthReport() { String scriptReport = (nodeHealthScriptRunner == null) ? "" : nodeHealthScriptRunner.getHealthReport(); if (scriptReport.equals("")) { return dirsHandler.getDisksHealthReport(false); } else { return scriptReport.concat(SEPARATOR + dirsHandler.getDisksHealthReport(false)); } }
/** * @return the reporting string of health of the node */ String getHealthReport() { String scriptReport = Strings.emptyToNull( nodeHealthScriptRunner == null ? null : nodeHealthScriptRunner.getHealthReport()); String discReport = Strings.emptyToNull( dirsHandler.getDisksHealthReport(false)); String exceptionReport = Strings.emptyToNull( nodeHealthException == null ? null : nodeHealthException.getMessage()); return Joiner.on(SEPARATOR).skipNulls() .join(scriptReport, discReport, exceptionReport); }
/** * Set good local dirs and good log dirs in the configuration so that the * LocalDirAllocator objects will use this updated configuration only. */ private void updateDirsAfterTest() { Configuration conf = getConfig(); List<String> localDirs = getLocalDirs(); conf.setStrings(NM_GOOD_LOCAL_DIRS, localDirs.toArray(new String[localDirs.size()])); List<String> logDirs = getLogDirs(); conf.setStrings(NM_GOOD_LOG_DIRS, logDirs.toArray(new String[logDirs.size()])); if (!areDisksHealthy()) { // Just log. LOG.error("Most of the disks failed. " + getDisksHealthReport(false)); } }
/** * Set good local dirs and good log dirs in the configuration so that the * LocalDirAllocator objects will use this updated configuration only. */ private void updateDirsAfterTest() { Configuration conf = getConfig(); List<String> localDirs = getLocalDirs(); conf.setStrings(NM_GOOD_LOCAL_DIRS, localDirs.toArray(new String[localDirs.size()])); List<String> logDirs = getLogDirs(); conf.setStrings(NM_GOOD_LOG_DIRS, logDirs.toArray(new String[logDirs.size()])); if (!areDisksHealthy()) { // Just log. LOG.error("Most of the disks failed. " + getDisksHealthReport(false)); } }
/** * Set good local dirs and good log dirs in the configuration so that the * LocalDirAllocator objects will use this updated configuration only. */ private void updateDirsAfterTest() { Configuration conf = getConfig(); List<String> localDirs = getLocalDirs(); conf.setStrings(YarnConfiguration.NM_LOCAL_DIRS, localDirs.toArray(new String[localDirs.size()])); List<String> logDirs = getLogDirs(); conf.setStrings(YarnConfiguration.NM_LOG_DIRS, logDirs.toArray(new String[logDirs.size()])); if (!areDisksHealthy()) { // Just log. LOG.error("Most of the disks failed. " + getDisksHealthReport(false)); } }
/** * Set good local dirs and good log dirs in the configuration so that the * LocalDirAllocator objects will use this updated configuration only. */ private void updateDirsAfterTest() { Configuration conf = getConfig(); List<String> localDirs = getLocalDirs(); conf.setStrings(YarnConfiguration.NM_LOCAL_DIRS, localDirs.toArray(new String[localDirs.size()])); List<String> logDirs = getLogDirs(); conf.setStrings(YarnConfiguration.NM_LOG_DIRS, logDirs.toArray(new String[logDirs.size()])); if (!areDisksHealthy()) { // Just log. LOG.error("Most of the disks failed. " + getDisksHealthReport(false)); } }
} else { throw new IOException("All disks failed. " + dirsHandler.getDisksHealthReport(false));
} else { throw new IOException("All disks failed. " + dirsHandler.getDisksHealthReport(false));
} else { throw new IOException("All disks failed. " + dirsHandler.getDisksHealthReport(false));
} else { throw new IOException("All disks failed. " + dirsHandler.getDisksHealthReport(false));
ret = ContainerExitStatus.DISKS_FAILED; throw new IOException("Most of the disks failed. " + dirsHandler.getDisksHealthReport(false));
ret = ContainerExitStatus.DISKS_FAILED; throw new IOException("Most of the disks failed. " + dirsHandler.getDisksHealthReport(false));
ret = ContainerExitStatus.DISKS_FAILED; throw new IOException("Most of the disks failed. " + dirsHandler.getDisksHealthReport(false));
ret = ContainerExitStatus.DISKS_FAILED; throw new IOException("Most of the disks failed. " + dirsHandler.getDisksHealthReport(false));