code: @Override
    protected void checkPath(Path path) {
      if (conf.getBoolean("client.configuration.lookup.done", false)) {
        URI uri = path.toUri();
        String thisScheme = this.getUri().getScheme();
        String thatScheme = uri.getScheme();
        String thisHost = fsName.getHost();
        String thatHost = uri.getHost();
        if (thatScheme != null && thisScheme.equalsIgnoreCase(thatScheme)) {
          if (thisHost != null && thisHost.equalsIgnoreCase(thatHost)) {
            return;
          }
        }
      }
      super.checkPath(path);
    }
docs: This ensures that if we have done a client configuration lookup, the
  logicalName might have changed and we still need to allow URIs that specify
  the old logical name stored in fsName. It also allows paths that don't
  specify ports. For example :
  
  We would like to support connecting to a HDFS cluster like this
  :
  bin/hadoop dfs -ls hdfs://<clustername>.<servicename>/
  
  For this purpose we need to add some logic to checkPath(). The
  reason is that DAFS replaces the logical name with the one retrieved
  from the client configuration lookup and hence without this check, doing
  something like :
  
  bin/hadoop dfs -ls hdfs://<clustername>.<servicename>/
  
  would give a Wrong FS error, since <clustername>.<servicename> does not match
  with the actual URI after lookup which would be something like <host:port>
  
  Therefore in checkPath() we should also allow paths that have a URI with
  the old authority (<clustername>.<servicename>).