Package org.apache.hadoop.hdfs.server.common.Storage

Examples of org.apache.hadoop.hdfs.server.common.Storage.StorageState


    if (call.countExceptions() > 0) {
      call.throwQuorumException("Could not analyze one or more JournalNodes");
    }
   
    // iterate through responses and figure out the state
    StorageState state = null;
    StorageInfo storageInfo = null;
   
    for (GetStorageStateProto r : call.getResults().values()) {
      if (state == null) {
        state = r.getStorageState();
View Full Code Here


    FLOG.info("Startup: formatting unformatted directories.");
   
    // 2. Format unformatted dirs.
    for (Iterator<StorageDirectory> it = storage.dirIterator(); it.hasNext();) {
      StorageDirectory sd = it.next();
      StorageState curState = dataDirStates.get(sd);
      switch(curState) {
      case NON_EXISTENT:
        throw new IOException(StorageState.NON_EXISTENT +
                              " state cannot be here");
      case NOT_FORMATTED:       
View Full Code Here

      Map<StorageDirectory, StorageState> dataDirStates) throws IOException {
    boolean isFormatted = false;
    for (Iterator<StorageDirectory> it =
                      storage.dirIterator(); it.hasNext();) {
      StorageDirectory sd = it.next();
      StorageState curState;
      try {
        curState = sd.analyzeStorage(startOpt);
        isFormatted |= NNStorage.recoverDirectory(sd, startOpt, curState, true);
      } catch (IOException ioe) {
        sd.unlock();
View Full Code Here

      canRollback = NNStorage.canRollBack(sd, prevState.storage);
    }

    // Check non-file managers.
    for (RemoteStorageState s : remoteImageStates.values()) {
      StorageState state = s.getStorageState();
      if (state == StorageState.UPGRADE_DONE) {
        canRollback = true;
      }
    }

    // Check non-file managers.
    for (RemoteStorageState s : remoteJournalStates.values()) {
      StorageState state = s.getStorageState();
      if (state == StorageState.UPGRADE_DONE) {
        canRollback = true;
      }
    }
View Full Code Here

        }
        if(!isAccessible)
          throw new InconsistentFSStateException(sd.getRoot(),
              "cannot access checkpoint directory.");
       
        StorageState curState;
        try {
          curState = sd.analyzeStorage(HdfsConstants.StartupOption.REGULAR);
          // sd is locked but not opened
          switch(curState) {
          case NON_EXISTENT:
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hdfs.server.common.Storage.StorageState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.