Return-Path: X-Original-To: apmail-accumulo-user-archive@www.apache.org Delivered-To: apmail-accumulo-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A0D211864D for ; Mon, 28 Dec 2015 17:22:09 +0000 (UTC) Received: (qmail 677 invoked by uid 500); 28 Dec 2015 17:22:09 -0000 Delivered-To: apmail-accumulo-user-archive@accumulo.apache.org Received: (qmail 623 invoked by uid 500); 28 Dec 2015 17:22:09 -0000 Mailing-List: contact user-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@accumulo.apache.org Delivered-To: mailing list user@accumulo.apache.org Received: (qmail 613 invoked by uid 99); 28 Dec 2015 17:22:09 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Dec 2015 17:22:09 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id C6727180186 for ; Mon, 28 Dec 2015 17:22:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.121 X-Spam-Level: X-Spam-Status: No, score=-0.121 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id deiVhgrJvE2w for ; Mon, 28 Dec 2015 17:22:08 +0000 (UTC) Received: from mail-qk0-f180.google.com (mail-qk0-f180.google.com [209.85.220.180]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id CC8E2439AD for ; Mon, 28 Dec 2015 17:22:07 +0000 (UTC) Received: by mail-qk0-f180.google.com with SMTP id p187so196588412qkd.1 for ; Mon, 28 Dec 2015 09:22:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=EjSFd+yqY9NY+DvhzzdmQcuVsDnLB90L/TYUtltjeEo=; b=hdGL19QQwXy0h8VXZFPVapX3dkEOrybPlAoSTRCKt+YTEYWHyaNyBVp2LmwIqPWHL4 D+oy27VYwo/8zbqV0rydrRoyT4z62/X7BGf6uPmoYEpgDB7Z75HOAkzc2hapZ+ZKtCN3 aq1m0eU6t2jgvr/ykoDvMwh/9VstBXAtQiofEQIajo7q4Jlgv4kHTeNHKSgLER9Qp6wZ pigREnI7K3hvdO0jH64Wudu/C2VTVpiunTWdCxLN+sZo3QoDrHtL7Ai99H6aJwWnXpoO azGYrrJmLQClAVjQExaX9JO4iYaXSuNk060EXcESVaICMtpNsv4sQV0a527TEHd5+t4K IIng== X-Received: by 10.55.77.216 with SMTP id a207mr71561154qkb.80.1451323321046; Mon, 28 Dec 2015 09:22:01 -0800 (PST) Received: from hw10447.local (72-63-202-59.pools.spcsdns.net. [72.63.202.59]) by smtp.googlemail.com with ESMTPSA id q12sm27796843qki.15.2015.12.28.09.21.59 for (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 Dec 2015 09:22:00 -0800 (PST) Message-ID: <56816FB4.8070605@gmail.com> Date: Mon, 28 Dec 2015 12:21:56 -0500 From: Josh Elser User-Agent: Postbox 3.0.11 (Macintosh/20140602) MIME-Version: 1.0 To: user@accumulo.apache.org Subject: Re: Map Lexicoder References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Looks like you would have to implement some kind of ComparableMap to be able to use the PairLexicoder (see that the parameterization requires both types in the Pair to implement Comparable). The Pair lexicoder requires these Comparable types to align itself with the original goal of the Lexicoders: provide byte-array serialization for types whose sort order matches the original object's ordering. Typically, when we have key to value style data we want to put in Accumulo, it makes sense to leverage the Column Qualifier and the Value, instead of serializing everything into one Accumulo Value. Iterators make it easy to do server-side predicates and transformations. My hunch is that this is another reason why you don't already see a MapLexicoder provided. One technical difficulty you might run into implementing a generalized MapLexicoder is how you delimit the key and value in one pair and how you delimit many pairs from each other. Commonly, the "null" byte (\x00) is used as a separator since it doesn't often appear in user-data. I'm not sure if some of the other Lexicoders already use this in their serialization (e.g. the ListLexicoder might, I haven't looked at the code). Nesting Lexicoders generically might be tricky (although not impossible) -- thought it was worth mentioning to make sure you thought about it. Adam J. Shook wrote: > Hello all, > > Any suggestions for using a Map Lexicoder (or implementing one)? I am > currently using a new ListLexicoder(new PairLexicoder(some lexicoder, > some lexicoder), which is working for single maps. However, when one of > the lexicoders in the Pair is itself a Map (and therefore another > ListLexicoder(PairLexicoder)), an exception is being thrown because > ArrayList is not Comparable. > > Regards, > --Adam