Skip to content

DO NOT MERGE YET! added BlockWriterDialTimeout to namenode #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

advincze
Copy link
Contributor

see #70 for the problem statement

this is how i use it with a sock5 proxy

	socksProxy := "localhost:8157"
	var dialerFn = func(network, address string, timeout time.Duration) (net.Conn, error) {
		if socksProxy != "" {
			dialer, _ := proxy.SOCKS5("tcp", socksProxy, nil, proxy.Direct)
			return dialer.Dial(network, address)
		}
		return net.DialTimeout(network, address, timeout)
	}

	c, _ := dialerFn("tcp", nameNodeAddr, time.Second)
	nc, _ := rpc.WrapNamenodeConnection(c, hdfsUser)
	nc.BlockWriterDialTimeout = dialerFn
	hdfsCli := hdfs.NewForConnection(nc)
	defer hdfsCli.Close()

@advincze advincze changed the title added BlockWriterDialTimeout to namenode DO NOT MERGE YET! added BlockWriterDialTimeout to namenode Mar 16, 2017
@colinmarc colinmarc closed this May 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants