code: private void verifyEditStreams() throws IOException {
      // we check if the shared stream is still available
      if (getFSImage().getEditLog().isSharedJournalAvailable()
          && InjectionHandler
              .trueCondition(InjectionEvent.AVATARNODE_CHECKEDITSTREAMS)) {
        return;
      }
  
      // for sanity check if the number of available journals
      // is equal to the number of configured ones
      int expectedEditStreams = NNStorageConfiguration.getNamespaceEditsDirs(
          confg).size();
      int actualEditStreams = this.namesystem.getFSImage().getEditLog()
          .getNumberOfAvailableJournals();
      if (expectedEditStreams == actualEditStreams
          && InjectionHandler
              .trueCondition(InjectionEvent.AVATARNODE_CHECKEDITSTREAMS)) {
        return;
      }
  
      String msg = "Failover: Cannot proceed - shared journal is not available. "
          + "Number of required edit streams: " + expectedEditStreams
          + " current number: " + actualEditStreams;
      LOG.fatal(msg);
      throw new IOException(msg);
    }
docs: Return true if the shared journal is active, or if the number
  of active journals is equal to the number of configured journals.
  Throw IOException otherwise.