DESCRIPTION

Added vbucket configuration parser from JSON.

This parser from JSON has several methods for parsing JSON, beans to
store configuration settings and unit tests.

Change-Id: I478b274e7901e8c1729c20fcc29577b8aff651af


COMMENTS

author: Andreas Short
date: 2011-05-31 06:25:45.112000000

Patch Set 1:

Sorry for having to abandon the last review request, but it became clear that while I'd cleaned it up a lot, it was still missing context and was dependent on later commits.  

I've now spent a lot of time trying to clean things up and address objections, plus squash down many fixes I'd made to ensure tests pass, etc.

At the end of all of this, you'll see that this model of the cluster is mostly accessed by one thread (the HTTP monitor thread) and the way topology changes are handled should be safe (I need to re-verify this myself).

I'll have some other changes that bring the whole picture together up soon.

-------------------------------------
author: Jakob Lozano
date: 2011-05-31 17:33:44.390000000

Patch Set 1: (4 inline comments)



Line:12, src/main/java/net/spy/memcached/vbucket/config/Pool.java -> These all can be made final, since nobody sets them.

Line:18, src/main/java/net/spy/memcached/vbucket/config/ConfigurationParserJSON.java -> Use LoggerFactory.getLogger() instead.  This allows the logger to be abstracted out.

Line:9, src/main/java/net/spy/memcached/vbucket/config/Node.java -> Can ports be made final?

Line:38, src/main/java/net/spy/memcached/vbucket/config/Node.java -> For faster failure, move this line above the line comparing ports.

-------------------------------------
author: Noah Dean
date: 2011-06-01 05:00:03.569000000

Patch Set 1: (3 inline comments)

I think I might take some of this stuff for a spin through eclipse.

Line:12, src/main/java/net/spy/memcached/vbucket/config/Pool.java -> I think I had eclipse set up to just do that for me.  It's nice to be able to easily see which things are changing.

Line:20, src/main/java/net/spy/memcached/vbucket/config/Pool.java -> Any reason not to have this just be a HashMap?

Line:18, src/main/java/net/spy/memcached/vbucket/config/ConfigurationParserJSON.java -> Many of the objects extends SpyObject or similar and can just call getLogger() when they need it.

-------------------------------------
author: Noah Dean
date: 2011-06-01 05:44:18.485000000

Patch Set 1: I would prefer that you didn't submit this

(1 inline comment)



Line:12, src/main/java/net/spy/memcached/vbucket/config/Pool.java -> I put a bit of effort into this, but it's somewhat confusing.  I couldn't find much setting it.

It makes sense for this to be built and returned from a configuration thing somewhere, but it seems like it's dynamically adjusted within that thing.

-------------------------------------
author: Andreas Short
date: 2011-06-01 13:19:56.301000000

Patch Set 1: (1 inline comment)

Thanks for looking this over all, have to handle some other things at the moment, but should be able to respond to all of these by tomorrow morn.

Line:18, src/main/java/net/spy/memcached/vbucket/config/ConfigurationParserJSON.java -> Yes, forgot to change this over to SpyObject and getLogger, but then the log formatting will need to change slightly too.

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