code: @Override
    public void initializeReplicationQueues() {
      // acquire writelock first to avoid deadlock
      namesystem.writeLock();
      // we can only initialize replication queues manually 
      // during failover
      try {
        synchronized (this) {
          if (safeModeState != SafeModeState.FAILOVER_IN_PROGRESS &&
              safeModeState != SafeModeState.BEFORE_FAILOVER) {
            throw new RuntimeException(
                "Cannot initialize replication queues since Standby is "
                    + "in state : " + safeModeState);
          }
          super.initializeReplQueues();
        }
      } finally {
        namesystem.writeUnlock();
      }
    }
docs: Initializes replication queues *without* leaving safemode.
  This should only be used ONLY through dfsadmin command.