DESCRIPTION

JCBC-407: Add BootstrapNodeUtil class to help with DNS SRV bootstrap.

A BootstrapNodeUtil class is provided, which takes a DNS SRV endpoint and
transforms it into a list of bootstrappable URIs. For example

	String path = "_seeds._tcp.couchbase.com";
	try {
	  new CouchbaseClient(BootstrapNodeUtil.locateFromDNS(path),...);
	} catch(IOException ex) {
		// Could not load the records from DNS...
	}

Change-Id: I8dbc94a96051d04b2a54d6539b7d6676ea0bd677


COMMENTS

author: Natasha Sullivan
date: 2014-01-31 08:16:28.806000000

Uploaded patch set 4.

-------------------------------------
author: Andreas Short
date: 2014-01-31 08:24:10.971000000

Patch Set 4: -Code-Review

(3 comments)

Line:98, src/main/java/com/couchbase/client/BootstrapNodeUtil.java -> Why not catch the specific exceptions you want to include in your IOException?

Line:13, /COMMIT_MSG -> whoops, tabs!

Also, I think a better code sample would be one that does the locateFromDNS() outside the ctor, but this is certainly valid.

Line:52, src/test/java/com/couchbase/client/BootstrapNodeUtilTest.java -> hmm, should this be for CCCP only, and thus be port 11210?  I think so.

-------------------------------------
author: Natasha Sullivan
date: 2014-02-03 08:10:07.929000000

Patch Set 4:

(3 comments)

Line:98, src/main/java/com/couchbase/client/BootstrapNodeUtil.java -> You mean just catching the narrow ones? I can fix that, my intent was to catch everything and so prevent the user from having to catch others as well by just catching one IOException..

But I can fix that of course

Line:13, /COMMIT_MSG -> oh jeah, apparently thats the default VI setting.. I seldomly indent stuff in commit msgs.

Line:52, src/test/java/com/couchbase/client/BootstrapNodeUtilTest.java -> Why should we limit us to CCCP only for this?

As it stands now (and we may need to revisit this), we are not changing the CTORs, so providing 11210 here would completely fail our bootstrap process.

-------------------------------------
author: Andreas Short
date: 2014-02-14 06:38:58.796000000

Patch Set 4: Code-Review-1

(2 comments)

It'd be good to fix the exception handling.

Line:98, src/main/java/com/couchbase/client/BootstrapNodeUtil.java -> Well, we don't know what other stuff could happen.  It'd be better to not catch all of them I think, just the documented ones.

Line:52, src/test/java/com/couchbase/client/BootstrapNodeUtilTest.java -> personally, I think it should be CCCP only.  It's the future and a different model.  We could describe the other model in an SRV record too I guess, but that's more changes.

or we could have _cccp and _http?

-------------------------------------
