DESCRIPTION

JCBC-777: Index Management

Motivation:
-----------
Secondary index management (listing, creating and dropping indexes on a
particular bucket) is something that can be considered a repetitive
task for some categories of users and as such can be offered as an API
on top of the corresponding N1QL requests.

Modifications:
--------------
Introduced several methods in the BucketManager and AsyncBucketManager
to deal with secondary indexes. This API only deals with GSI indexes.

Methods to watch specific indexes, polling until they become online (in
the case of a deferred build) are also part of the API.

Modified the IndexNamesPath to be able to trigger a build on a List of
indexes (rather than having to rework such a list into a first parameter
followed by a vararg).

Added integration tests for the API.

Results:
--------
Users can now manage (GSI) indexes more easily than by crafting adhoc
N1QL queries.

Change-Id: I9b4224bf7b640e4e2543a53a5747ba418e6f8a75


COMMENTS

author: Estrella Humphrey
date: 2015-12-08 17:44:04.470000000

Uploaded patch set 3.

-------------------------------------
author: Estrella Humphrey
date: 2015-12-08 17:45:38.219000000

Patch Set 3: Verified+1

-------------------------------------
author: Cory Peck
date: 2015-12-15 18:16:23.053000000

Patch Set 3: Code-Review+2

(1 comment)

Line:89, src/integration/java/com/couchbase/client/java/bucket/BucketManagerIndexManagementTests.java -> maybe use logger here? or avoid output in tests at all

-------------------------------------
author: Natasha Sullivan
date: 2015-12-16 09:47:42.042000000

Patch Set 3:

(3 comments)

Line:258, src/main/java/com/couchbase/client/java/bucket/AsyncBucketManager.java -> can/will ? (same wording with the other blocks)

Line:321, src/main/java/com/couchbase/client/java/bucket/AsyncBucketManager.java -> shouldn't this be Observable<String> ?

Line:347, src/main/java/com/couchbase/client/java/bucket/AsyncBucketManager.java -> All the other APIs have the timeout at the very end, what do you think about just keeping List<String> watchList and moving it to the very beginning? and then drop the String... watchList variant.. People could always use Arrays.asList(...) if they want vararg.

same of course for the blocking API

-------------------------------------
author: Estrella Humphrey
date: 2015-12-16 11:59:25.156000000

Patch Set 3:

(3 comments)

Line:258, src/main/java/com/couchbase/client/java/bucket/AsyncBucketManager.java -> done

Line:321, src/main/java/com/couchbase/client/java/bucket/AsyncBucketManager.java -> the rationale is that 1) the list will always be emitted in one go and 2) it's sole purpose is that it can be passed to watchIndexes directly (which consumes a list)

Line:347, src/main/java/com/couchbase/client/java/bucket/AsyncBucketManager.java -> fair point, I simplified that as suggested

-------------------------------------
author: Tate Garrett
date: 2015-12-16 14:47:05.809000000

Change has been successfully cherry-picked as a402ceedf504ab365e68628e0ecc6bb374218639

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