StorageState curState; try { curState = sd.analyzeStorage(HdfsServerConstants.StartupOption.REGULAR, storage);
curState = sd.analyzeStorage(startOpt, storage);
curState = sd.analyzeStorage(HdfsServerConstants.StartupOption.REGULAR, storage);
curState = sd.analyzeStorage(HdfsServerConstants.StartupOption.REGULAR, storage);
StorageDirectory sd = new StorageDirectory(dataDir, null, true); try { StorageState curState = sd.analyzeStorage(startOpt, this);
StorageState curState; try { curState = sd.analyzeStorage(startOpt);
StorageState curState; try { curState = sd.analyzeStorage(HdfsServerConstants.StartupOption.REGULAR, storage);
StorageDirectory sd = new StorageDirectory(dataDir, null, false); try { StorageState curState = sd.analyzeStorage(startOpt, this);
StorageState curState; try { curState = sd.analyzeStorage(HdfsServerConstants.StartupOption.REGULAR, storage);
StorageDirectory sd = new StorageDirectory(dataDir, null, false); try { StorageState curState = sd.analyzeStorage(startOpt, this);
void analyzeAndRecoverStorage(StartupOption startOpt) throws IOException { this.state = sd.analyzeStorage(startOpt, this); final boolean needRecover = state != StorageState.NORMAL && state != StorageState.NON_EXISTENT && state != StorageState.NOT_FORMATTED; if (state == StorageState.NORMAL && startOpt != StartupOption.ROLLBACK) { readProperties(sd); } else if (needRecover) { sd.doRecover(state); } }
void analyzeStorage() throws IOException { this.state = sd.analyzeStorage(StartupOption.REGULAR, this); if (state == StorageState.NORMAL) { readProperties(sd); } }
void analyzeStorage() throws IOException { this.state = sd.analyzeStorage(StartupOption.REGULAR, this); if (state == StorageState.NORMAL) { readProperties(sd); } }
void analyzeAndRecoverStorage(StartupOption startOpt) throws IOException { this.state = sd.analyzeStorage(startOpt, this); final boolean needRecover = state != StorageState.NORMAL && state != StorageState.NON_EXISTENT && state != StorageState.NOT_FORMATTED; if (state == StorageState.NORMAL && startOpt != StartupOption.ROLLBACK) { readProperties(sd); } else if (needRecover) { sd.doRecover(state); } }
nsInfo.getBlockPoolID(), null, true, location); try { StorageState curState = sd.analyzeStorage(startOpt, this, true);
StorageDirectory sd = new StorageDirectory(null, false, location); try { StorageState curState = sd.analyzeStorage(startOpt, this, true);
void format(NamespaceInfo nsInfo, boolean force) throws IOException { unlockAll(); try { sd.analyzeStorage(StartupOption.FORMAT, this, !force); } finally { sd.unlock(); } setStorageInfo(nsInfo); LOG.info("Formatting journal {} with nsid: {}", sd, getNamespaceID()); // Unlock the directory before formatting, because we will // re-analyze it after format(). The analyzeStorage() call // below is reponsible for re-locking it. This is a no-op // if the storage is not currently locked. unlockAll(); sd.clearDirectory(); writeProperties(sd); createPaxosDir(); analyzeStorage(); }
/** * Check consistency of the storage directory. * * @param startOpt a startup option. * @param storage The Storage object that manages this StorageDirectory. * * @return state {@link StorageState} of the storage directory * @throws InconsistentFSStateException if directory state is not * consistent and cannot be recovered. * @throws IOException */ public StorageState analyzeStorage(StartupOption startOpt, Storage storage) throws IOException { return analyzeStorage(startOpt, storage, false); }
void analyzeAndRecoverStorage(StartupOption startOpt) throws IOException { this.state = sd.analyzeStorage(startOpt, this); final boolean needRecover = state != StorageState.NORMAL && state != StorageState.NON_EXISTENT && state != StorageState.NOT_FORMATTED; if (state == StorageState.NORMAL && startOpt != StartupOption.ROLLBACK) { readProperties(sd); } else if (needRecover) { sd.doRecover(state); } }
void analyzeStorage() throws IOException { this.state = sd.analyzeStorage(StartupOption.REGULAR, this); if (state == StorageState.NORMAL) { readProperties(sd); } }