DESCRIPTION

Added support for views

Change-Id: I67a5912f2b329151c15cff7fc89ab7ef3700503e


COMMENTS

author: Jeffrey Roth
date: 2012-03-09 16:05:31.674000000

Uploaded patch set 2.

-------------------------------------
author: Andreas Short
date: 2012-03-09 22:50:32.499000000

Patch Set 2: Do not submit

(23 inline comments)



Line:66, src/main/java/com/couchbase/client/CouchbaseConnection.java -> Why are we sticking these methods above this instance variable declaration?

Line:110, src/main/java/com/couchbase/client/CouchbaseConnection.java -> Incorrect user agent.

Line:40, src/main/java/com/couchbase/client/protocol/views/ViewResponseNoDocs.java -> javadoc

Line:45, src/main/java/com/couchbase/client/protocol/views/ViewResponseNoDocs.java -> should be a warning here that the return string could be massive and that it's colon delimited

Line:40, src/main/java/com/couchbase/client/protocol/views/HttpOperation.java -> seems like these need some javadocs

Line:2, src/main/java/com/couchbase/client/ViewNode.java -> These all need new copyright dates.

Line:213, src/main/java/com/couchbase/client/ViewNode.java -> These finals are really not needed.  Makes me wonder what we're protecting from.

Line:214, src/main/java/com/couchbase/client/ViewNode.java -> We need to clean up the logging.  Some is JDK logging, some is spy logging.

Line:146, src/main/java/com/couchbase/client/CouchbaseClient.java -> I find this comment pretty confusing.  What is "the changes feed".  I know this isn't in this commit, but needs to be somewhere.

Line:236, src/main/java/com/couchbase/client/CouchbaseClient.java -> This seems slightly confusing.  We should explain a bit more here and have a bit more common language with the views manual perhaps?

This isn't so much about "getting"  a view, it's more about accessing a view.

Line:282, src/main/java/com/couchbase/client/CouchbaseClient.java -> same comment.

Line:365, src/main/java/com/couchbase/client/CouchbaseClient.java -> This actually isn't true.  It doesn't call it's map function, the map function is called per doc on view build, and the results stored in a b+tree.  We're just using params to control walking the b+tree.

Line:377, src/main/java/com/couchbase/client/CouchbaseClient.java -> I'm slightly concerned about this-- views can be incrementally accessed though I know we don't currently.  We don't have to mess with it now but we should think about it in the future.

Line:414, src/main/java/com/couchbase/client/CouchbaseClient.java -> same comment.

Line:422, src/main/java/com/couchbase/client/CouchbaseClient.java -> why not asyncQueryExcludeDocs() without the "And"?

Line:457, src/main/java/com/couchbase/client/CouchbaseClient.java -> same comment.

Line:29, src/main/java/com/couchbase/client/protocol/views/NoDocsOperation.java -> same comment

Line:101, src/main/java/com/couchbase/client/internal/ViewFuture.java -> Should this be public?  I'm not quite sure what I'd do with this.

Line:41, src/main/java/com/couchbase/client/protocol/views/ViewResponse.java -> javadoc

Line:46, src/main/java/com/couchbase/client/protocol/views/ViewResponse.java -> javadoc

Line:17, src/main/java/com/couchbase/client/JSONPopulator.java -> I'm pretty sure this class doesn't belong here at all.  It looks like it's for testing??

Line:42, src/main/java/com/couchbase/client/internal/HttpFuture.java -> This is a meaningless variable name.  I can't tell what it is without digging further.

Line:104, src/main/java/com/couchbase/client/internal/HttpFuture.java -> ick.  it seems like status, if tracking states, should always have a state-- not just be null and when you try to get it's status, the get runs.

This is actually probably a bug, because what if I take the future, reference the operation from the future, and call status while the other get is in flight?

-------------------------------------
author: Kenny Maynard
date: 2012-03-10 00:48:52.266000000

Patch Set 2: (10 inline comments)

I addressed some of the comments here. Matt, let's discuss some of this early next week. Also, I'm sure checkstyle fails on this so we need to make sure that that gets run.

Line:66, src/main/java/com/couchbase/client/CouchbaseConnection.java -> No reason. It should be moved to the top of the file.

Line:214, src/main/java/com/couchbase/client/ViewNode.java -> The ones that are using JDK logging are most likely because they are already extending another class. I think logging should be taken care of in a different change set.

Line:146, src/main/java/com/couchbase/client/CouchbaseClient.java -> This whole comment should be deleted since the subscribe idea is no longer relevant in the constructor.

Line:236, src/main/java/com/couchbase/client/CouchbaseClient.java -> I'll let you and Rags work out how things should be commented.

Line:377, src/main/java/com/couchbase/client/CouchbaseClient.java -> Not sure what you mean here about accessing views incrementally. Can you elaborate so I can maybe give a better solution here.

Line:422, src/main/java/com/couchbase/client/CouchbaseClient.java -> That's how it was in the 2.8 dev preview. I don't care if we change it though. Also this is a private function that users won't be accessing.

Line:734, src/main/java/com/couchbase/client/CouchbaseClient.java -> These new lines should also be deleted.

Line:101, src/main/java/com/couchbase/client/internal/ViewFuture.java -> Your not supposed to do anything with it, but it should be public. Take a look at the other Future classes.

Line:17, src/main/java/com/couchbase/client/JSONPopulator.java -> Yeah. I should be deleted. Sorry.

Line:104, src/main/java/com/couchbase/client/internal/HttpFuture.java -> If this is an issue it shouldn't be addressed here. The way do this is done in other places in the code and was committed over 6 months ago. If this is an issue it should be addressed in another change set. Also, I haven't heard of anyone experiencing any issues with this yet. Matt, let's discuss this as a separate issue next week.

-------------------------------------
author: Andreas Short
date: 2012-03-10 00:53:33.392000000

Patch Set 2:

Sounds good Mike.  Actually, Rags is going to go through many of these tomorrow.

Some of these should turn into filed bugs even though we're going to probably do an update anyway, others (many of the javadoc comments) should just be addressed right now.

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