code: public void setRegistrationName(String name) {
      NamespaceService[] nsos = namespaceManager.getAllNamenodeThreads();
      for (NamespaceService ns : nsos) {
        ((NSOfferService) ns).setRegistrationName(name);
      }
    }
docs: Used only for testing.
  
  @param name
  the new name for datanode registration.