Return-Path: X-Original-To: apmail-accumulo-dev-archive@www.apache.org Delivered-To: apmail-accumulo-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C7FA0DB0E for ; Mon, 13 Aug 2012 16:07:02 +0000 (UTC) Received: (qmail 8989 invoked by uid 500); 13 Aug 2012 16:07:02 -0000 Delivered-To: apmail-accumulo-dev-archive@accumulo.apache.org Received: (qmail 8908 invoked by uid 500); 13 Aug 2012 16:07:02 -0000 Mailing-List: contact dev-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list dev@accumulo.apache.org Received: (qmail 8897 invoked by uid 99); 13 Aug 2012 16:07:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Aug 2012 16:07:02 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.212.41] (HELO mail-vb0-f41.google.com) (209.85.212.41) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Aug 2012 16:06:56 +0000 Received: by vbkv13 with SMTP id v13so4179048vbk.0 for ; Mon, 13 Aug 2012 09:06:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=mPdheIpFQxhazAjPZydAMNF8Huta+AciLjn7q/6mNXI=; b=chWWm/DJ3MihRft/qcWNTXNa0BQ2n518z0Ato3QRuBs86xojWf8HO9ZrrYk7OXLDiY m5+F4pl8imLMjZbb4eLNQ4wYff72QVwdyLuethF+8S3+lkcethzLOEPZvSAQ7ULubnbD 1jpCRr/7Ln6UhZmtN6llBODsbkmUwaOCthfwmkt3CSrWkYLZDCqyr6STptetkxunNmJk 7iFc7fLnKKHo6p9exEU6Diqgq6brQ7T/7qH3udi0okuYU9bsqudFwenIQo8r0ksA41Nk Gvc74mpFbk8PBOOKm/MJLoAWOvhlja0852P7lwZCkdlY07AZBNnBWRDALYp8HEfWn73J 5yjg== MIME-Version: 1.0 Received: by 10.220.220.76 with SMTP id hx12mr8628729vcb.9.1344873994857; Mon, 13 Aug 2012 09:06:34 -0700 (PDT) Received: by 10.59.8.5 with HTTP; Mon, 13 Aug 2012 09:06:34 -0700 (PDT) In-Reply-To: <50285A13.9090103@gmail.com> References: <50285A13.9090103@gmail.com> Date: Mon, 13 Aug 2012 12:06:34 -0400 Message-ID: Subject: Re: feedback on Typo From: Keith Turner To: dev@accumulo.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQljV8zczmuQSjUOK5WZK6FzxFazy6Poje/I6GaLfdpkKaLkvmaj6ZgRwkPPN8n88yBTrsEx On Sun, Aug 12, 2012 at 9:36 PM, Josh Elser wrote: > Neat idea, Keith. > > Have you thought about how to support more complex types? Specifically, > arrays, hashes and the nesting of those? Any thoughts about indexing for > those complex types? Yeah I was thinking that would be nice. I see a lot of users putting multiple types into the row and/or columns. Could have something like TupleEncoder>. TupleEncoder would need to encode it elements such that it sorts correctly. However, this may be cumbersome to use if you want to use different types. For example I want a row composed of a Long and String. I was thinking of having the following types to handle this case. class Pair extends LexEncoder{ Pair(LexEncoder enc1, LexEncoder enc2); A getFirst(){} B getSecond(){} } class Triple{//follows same pattern as Pair} class Quadruple{//follows same pattern as Pair} This would allow a user to write code like the following that makes it easy to work with a row composed of a Long and String. Pair pair; long l = pair.getFirst(); String s = pair.getSecond(); I am still thinking the tuple concept through. I was not considering indexing. I assuming you mean creating an index in another table? > > Initial thoughts are that it would make the most sense to place Typo at the > contrib level (or something equivalent). The reason being: Typo doesn't > change the underlying functionality of Accumulo; it only provides a layer on > top of it that makes life easier for developers. I think putting it in contrib makes sense. > > > On 08/10/2012 07:07 PM, Keith Turner wrote: >> >> I put together a simple abstraction layer for Accumulo that makes it >> easier to read and write Java objects to Accumulo key and value >> fields. The data written to Accumulo sort correctly >> lexicographically. >> >> I put the code on github and would like some feedback on the design >> and whether it should be included with Accumulo. >> >> https://github.com/keith-turner/typo >> >> Its still a little rough and I need to add encoder for all of the >> primitive types. >> >> Keith