Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-16831

[RBF SBN] GetNamenodesForNameserviceId should shuffle Observer NameNodes every time

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      The method getNamenodesForNameserviceId in MembershipNamenodeResolver.class should shuffle Observer NameNodes every time. The current logic will return the cached list and will caused all of read requests are forwarding to the first observer namenode. 

       

      The related code as bellow:

      @Override
      public List<? extends FederationNamenodeContext> getNamenodesForNameserviceId(
          final String nsId, boolean listObserversFirst) throws IOException {
      
        List<? extends FederationNamenodeContext> ret = cacheNS.get(Pair.of(nsId, listObserversFirst));
        if (ret != null) {
          return ret;
        } 
        ...
      }

      Attachments

        Issue Links

          Activity

            People

              xuzq_zander ZanderXu
              xuzq_zander ZanderXu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: