-Re: Generic Supertypes/Pluggable Client
Keith Turner 2013-07-05, 17:13
On Fri, Jul 5, 2013 at 9:50 AM, Josh Elser <[EMAIL PROTECTED]> wrote:
> > While we're at it, it seems sense to make it pluggable. This has the
>> > advantage of providing backwards compatibility with the current API
>> > still allowing us to tidy up moving forwards.
>> > I've opened an issue to document thoughts on this as well as a github
>> > request to document progress.
>> > https://issues.apache.org/**jira/browse/ACCUMULO-1551<https://issues.apache.org/jira/browse/ACCUMULO-1551>
>> > https://github.com/ekohlwey/**accumulo/compare/apache:trunk.**
>> Sweet. I look forward to checking out what you have already.
> Interesting, Ed. Funny enough, I've written some similar code back in the
> day , but when I ended up with a TypedScanner and realized that this
> conversion is happening solely on the client, I decided it wasn't worth the
> complexity in Accumulo's codebase.
> Are you planning to re-write all of the necessary Thrift classes to ensure
> this conversion happens server-side? If you're only intending on client
> side, doesn't Guava's Function combined with Iterators#transform and
> Iterables#transform do exactly what you've outlined? Are you more looking
> for this baked for such a transformation to be baked-in?
Josh, was not familiar w/ the Guava stuff you mentioned. I looked it up 
I think one thing that interesting about this approach is that it will work
nicely w/ key/values or groups of key values. Could do something like the
following for iterating over objects created from an entire row.
rowIter = new o.a.a.c.client.RowIterator(scanner);
rowObjIter = c.g.c.c.Iterators.transform(rowIter, rowFunc);
 : http://docs.guava-libraries.googlecode.com/git-history/release/javadoc/com/google/common/collect/Iterators.html#transform(java.util.Iterator,
> Have you looked into Keith's Typo example? 
>  https://issues.apache.org/**jira/browse/ACCUMULO-697<https://issues.apache.org/jira/browse/ACCUMULO-697>
>  https://github.com/keith-**turner/typo<https://github.com/keith-turner/typo>