code: public synchronized void close() throws IOException {
      if(clientRunning) {
        leasechecker.close();
        leasechecker.closeRenewal();
        if (blockLocationRenewal != null) {
          blockLocationRenewal.stop();
        }
        clientRunning = false;
        try {
          leasechecker.interruptAndJoin();
          if (blockLocationRenewal != null) {
            blockLocationRenewal.join();
          }
        } catch (InterruptedException ie) {
        }
  
        // close connections to the namenode
        RPC.stopProxy(rpcNamenode);
      }
    }
docs: Close the file system, abandoning all of the leases and files being
  created and close connections to the namenode.