synchronized List<FormatConfirmable> getFormatConfirmables() { Preconditions.checkState(state == State.BETWEEN_LOG_SEGMENTS, "Bad state: %s", state); List<FormatConfirmable> ret = Lists.newArrayList(); for (final JournalManager jm : journalSet.getJournalManagers()) { // The FJMs are confirmed separately since they are also // StorageDirectories if (!(jm instanceof FileJournalManager)) { ret.add(jm); } } return ret; }
/** * Find the JournalAndStream associated with this BackupNode. * * @return null if it cannot be found */ private synchronized BackupJournalManager findBackupJournal( NamenodeRegistration bnReg) { for (JournalManager bjm : journalSet.getJournalManagers()) { if ((bjm instanceof BackupJournalManager) && ((BackupJournalManager) bjm).matchesRegistration(bnReg)) { return (BackupJournalManager) bjm; } } return null; }
/** * Format all configured journals which are not file-based. * * File-based journals are skipped, since they are formatted by the * Storage format code. */ synchronized void formatNonFileJournals(NamespaceInfo nsInfo, boolean force) throws IOException { Preconditions.checkState(state == State.BETWEEN_LOG_SEGMENTS, "Bad state: %s", state); for (JournalManager jm : journalSet.getJournalManagers()) { if (!(jm instanceof FileJournalManager)) { jm.format(nsInfo, force); } } }
if (sync) { synctxid = syncStart; for (JournalManager jm : journalSet.getJournalManagers()) {
synchronized List<FormatConfirmable> getFormatConfirmables() { Preconditions.checkState(state == State.BETWEEN_LOG_SEGMENTS, "Bad state: %s", state); List<FormatConfirmable> ret = Lists.newArrayList(); for (final JournalManager jm : journalSet.getJournalManagers()) { // The FJMs are confirmed separately since they are also // StorageDirectories if (!(jm instanceof FileJournalManager)) { ret.add(jm); } } return ret; }
/** * Format all configured journals which are not file-based. * * File-based journals are skipped, since they are formatted by the * Storage format code. */ synchronized void formatNonFileJournals(NamespaceInfo nsInfo) throws IOException { Preconditions.checkState(state == State.BETWEEN_LOG_SEGMENTS, "Bad state: %s", state); for (JournalManager jm : journalSet.getJournalManagers()) { if (!(jm instanceof FileJournalManager)) { jm.format(nsInfo); } } }
/** * Find the JournalAndStream associated with this BackupNode. * * @return null if it cannot be found */ private synchronized BackupJournalManager findBackupJournal( NamenodeRegistration bnReg) { for (JournalManager bjm : journalSet.getJournalManagers()) { if ((bjm instanceof BackupJournalManager) && ((BackupJournalManager) bjm).matchesRegistration(bnReg)) { return (BackupJournalManager) bjm; } } return null; }
/** * Find the JournalAndStream associated with this BackupNode. * * @return null if it cannot be found */ private synchronized BackupJournalManager findBackupJournal( NamenodeRegistration bnReg) { for (JournalManager bjm : journalSet.getJournalManagers()) { if ((bjm instanceof BackupJournalManager) && ((BackupJournalManager) bjm).matchesRegistration(bnReg)) { return (BackupJournalManager) bjm; } } return null; }
synchronized List<FormatConfirmable> getFormatConfirmables() { Preconditions.checkState(state == State.BETWEEN_LOG_SEGMENTS, "Bad state: %s", state); List<FormatConfirmable> ret = Lists.newArrayList(); for (final JournalManager jm : journalSet.getJournalManagers()) { // The FJMs are confirmed separately since they are also // StorageDirectories if (!(jm instanceof FileJournalManager)) { ret.add(jm); } } return ret; }
/** * Format all configured journals which are not file-based. * * File-based journals are skipped, since they are formatted by the * Storage format code. */ synchronized void formatNonFileJournals(NamespaceInfo nsInfo) throws IOException { Preconditions.checkState(state == State.BETWEEN_LOG_SEGMENTS, "Bad state: %s", state); for (JournalManager jm : journalSet.getJournalManagers()) { if (!(jm instanceof FileJournalManager)) { jm.format(nsInfo); } } }