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 >> while >> > still allowing us to tidy up moving forwards. >> > >> > I've opened an issue to document thoughts on this as well as a github >> pull >> > 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.** >> ..ACCUMULO-1551<https://github.com/ekohlwey/accumulo/compare/apache:trunk...ACCUMULO-1551> >> >> 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 [1], 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 [3] 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); [3] : http://docs.guava-libraries.googlecode.com/git-history/release/javadoc/com/google/common/collect/Iterators.html#transform(java.util.Iterator, com.google.common.base.Function) > > Have you looked into Keith's Typo example? [2] > > > [1] > https://issues.apache.org/**jira/browse/ACCUMULO-697<https://issues.apache.org/jira/browse/ACCUMULO-697> > [2] > https://github.com/keith-**turner/typo<https://github.com/keith-turner/typo> >
