DESCRIPTION

JVMCBC-116: Do not route view requests to nodes without partitions.

Motivation
----------
When a node is removed from the cluster, there is a timeframe when all partitions went away,
but it is still part of the logical cluster config. At this point in time, view requests
should not be routed to this node anymore.

Modifications
-------------
The changesets has three components:

	1) It provides a utility method on the CouchbaseBucketConfig that returns a boolean
	   to quickly check if the given node contains at least one primary partition.

	   Note that these are cached when the config is created to save CPU cycled on the
	   hot code path (when checking).

	2) It adds a check to the ViewLocator so that a node is not used when it has no
	   partitions assigned to it.

	3) Relatedly, the code in the ViewLocator immediately rejects requests that
	   cannot be served from the config type. This mainly includes view requests
	   being cancelled right away against a memcached bucket type.

	   As part of this effort, a new exception has been added to semantically
	   indicate this state.

Tests have been added to verify the new functionality on a unit-test basis.

Result
------
View requests are not routed to nodes anymore which do not have primary partitions
assigned to it.

Change-Id: I02b92f7fa2cf379e311eb88f01a87336b746529a
Reviewed-on: http://review.couchbase.org/44898
Reviewed-by: Estrella Humphrey xxx@xxx.xxx
Tested-by: Natasha Sullivan xxx@xxx.xxx


COMMENTS

author: Estrella Humphrey
date: 2015-01-05 18:58:02.331000000

Uploaded patch set 1.

-------------------------------------
author: Natasha Sullivan
date: 2015-01-05 19:03:56.795000000

Patch Set 1: Code-Review+2

-------------------------------------
author: Estrella Humphrey
date: 2015-01-05 19:16:27.481000000

Patch Set 1: Verified+1

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