@Override
    public DnsNameResolver newNameResolver(URI targetUri, NameResolver.Args args) {
        if (SCHEME.equals(targetUri.getScheme())) {
            String targetPath = Preconditions.checkNotNull(targetUri.getPath(), "targetPath");
            Preconditions.checkArgument(targetPath.startsWith("/"),
                    "the path component (%s) of the target (%s) must start with '/'", targetPath, targetUri);
            String name = targetPath.substring(1);
            return new DnsNameResolver(
                    targetUri.getAuthority(),
                    name,
                    args,
                    // rename thread
                    wrapExecutor(this.dnsExecutor),
                    Stopwatch.createUnstarted(), false);
        } else {
            return null;
        }
    }
copy from : https://github.com/grpc/grpc-java/blob/master/core/src/main/java/io/grpc/internal/DnsNameResolverProvider.java
grpc/src/main/java/io/grpc/internal/PinpointDnsNameResolverProvider.java