DESCRIPTION

Added tap client

The tap client currently supports doing tap backfill as well as
being able to specify custom tap streams. Unit tests are included
to test backfill functionality.

Change-Id: I214d39b2c16ea68867f42a3c75aac565d36e8c21


COMMENTS

author: Andreas Short
date: 2011-06-08 09:34:35.885000000

Patch Set 1: (9 inline comments)



Line:41, src/main/java/net/spy/memcached/TapClient.java -> Need some docs, but I expect that's coming.

Line:53, src/main/java/net/spy/memcached/TapClient.java -> nitpick: MemcachedClient now has a ctor that uses bucketName as username, perhaps this should too.

Line:243, src/main/java/net/spy/memcached/TapClient.java -> Nice!  Will this include only mutations, or all TAP responses?  Might be good to clarify.

Line:6, src/main/java/net/spy/memcached/tapmessage/Opcode.java -> Perhaps this should be TapOpcode just so it's a bit more specific.

Line:344, src/main/java/net/spy/memcached/TapConnectionProvider.java -> A lot of this code looks quite familiar.  :)  Did you decide it's impossible to extend an existing class and override as needed?

Line:6, src/main/java/net/spy/memcached/tapmessage/Magic.java -> Magic is TAP specific?  Perhaps it should be TapMagic just to be a little less generic.

We don't have any other Magic... yet.

Line:4, src/main/java/net/spy/memcached/tapmessage/FieldDoesNotExistException.java -> I'm not so certain this should exist.  See the other comments.

Line:291, src/main/java/net/spy/memcached/tapmessage/BaseMessage.java -> much better to have logging here or a String return that something could call toString() on.  Like logging.

This mostly looks like a toString() method, except it's tickling stdout.  That's someone  else's job.

By the way, if you insist on writing with System.something, use System.err, not System.out.  Better to just use logging.

Line:85, src/main/java/net/spy/memcached/protocol/binary/TapOperationImpl.java -> exceptions for control flow aren't usually good.  they used to be bad for performance too, not sure if that's still true.  in any event, is this the only way to do this?

-------------------------------------
author: Kenny Maynard
date: 2011-06-09 18:04:56.238000000

Patch Set 1: (9 inline comments)

There was one issue here that I wasn't able to understand how to fix. Please re-comment on or discuss with me offline.

Line:41, src/main/java/net/spy/memcached/TapClient.java -> Done

Line:53, src/main/java/net/spy/memcached/TapClient.java -> I have looked at the MemcachedClient and I do not understand how to correct this issue.

Line:243, src/main/java/net/spy/memcached/TapClient.java -> Done

Line:6, src/main/java/net/spy/memcached/tapmessage/Opcode.java -> Done

Line:344, src/main/java/net/spy/memcached/TapConnectionProvider.java -> MemcachedConnection is final. I think I asked Dustin if I could make it not final and I think he said I probably shouldn't.

Line:6, src/main/java/net/spy/memcached/tapmessage/Magic.java -> Done

Line:4, src/main/java/net/spy/memcached/tapmessage/FieldDoesNotExistException.java -> Removed

Line:291, src/main/java/net/spy/memcached/tapmessage/BaseMessage.java -> Moved to a another class that users can user to see what tap messages look like. System.out/err changed to PrintWriter so users can decide where to send the output.

Line:85, src/main/java/net/spy/memcached/protocol/binary/TapOperationImpl.java -> Done

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