code: @Override
    ClientProtocol getNewNameNode(ClientProtocol rpcNamenode, Configuration conf)
        throws IOException {
      ClientProtocol namenode = DFSClient.createNamenode(rpcNamenode, conf);
      if (failoverClient == null) {
        failoverClient = new FailoverClientProtocol(namenode,
            failoverHandler);
      }
      failoverClient.setNameNode(namenode);
      return failoverClient;
    }
docs: This method ensures that when {@link DFSClient#getNewNameNodeIfNeeded(int)}
  runs, it still keeps the {@link DFSClient#namenode} object a type of
  {@link FailoverClientProtocol}