DESCRIPTION

JVMCBC-105: parse dp4 responses in QueryHandler

Motivation
----------
Between DP4 and DP3, response format was modified and enriched.

Modifications
-------------
Added new parsing steps for the new possible response sections :
 - signature
 - results (instead of resultset, still an array of json objects)
 - warnings (array of error objects)

 Modified initial parsing and GenericQueryReponse to include streams of
 errors (instead of putting them in info), an observable for the status
 that can only come once all rows have been processed and for IDs (with
 a requestId and a clientContextId).

 Modified parsing of existing steps to accommodate changes:
  - resultset is now "results"
  - info section is now "metrics", with a fixed schema (named fields,
  not a generic structure)
  - errors can be multiple (same format as warnings)

 Modified test data to reflect changes in response format, modified
 and added tests.

 Single emission items are now fed into an AsyncSubject instead of the
 ReplaySubject which has more overhead.

 Note: clients (the java SDK) should be updated to take these changes
 into account:
  - ResponseStatus is not definite (there still could be execution
  errors, one has to also look at queryStatus())
  - errors (and warnings) could be multiple, and are fed into errors()
  - info() now contains a single element with named metric fields

Result
------
QueryHandler now can parse DP4 responses. Tests pass.

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


COMMENTS

author: Estrella Humphrey
date: 2015-01-08 09:36:30.796000000

Change has been successfully cherry-picked as 108d4bff602f5dce31a0c3f6efa3159aad5c84b5

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