Return-Path: X-Original-To: apmail-hive-user-archive@www.apache.org Delivered-To: apmail-hive-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 B52E39FD2 for ; Mon, 23 Jul 2012 17:05:53 +0000 (UTC) Received: (qmail 43774 invoked by uid 500); 23 Jul 2012 17:05:52 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 43622 invoked by uid 500); 23 Jul 2012 17:05:52 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 43614 invoked by uid 99); 23 Jul 2012 17:05:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Jul 2012 17:05:52 +0000 X-ASF-Spam-Status: No, hits=0.3 required=5.0 tests=FREEMAIL_REPLY,FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of edlinuxguru@gmail.com designates 209.85.213.48 as permitted sender) Received: from [209.85.213.48] (HELO mail-yw0-f48.google.com) (209.85.213.48) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Jul 2012 17:05:43 +0000 Received: by yhfq46 with SMTP id q46so6677776yhf.35 for ; Mon, 23 Jul 2012 10:05:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=iBtIX+SjrigF/NepKasvwgUR+vS9L+X3vpGOp9APjMs=; b=xQWbR0MJDzu5oYggp95yYy3IQfmnSprz3Zu3ngonvPX+Upc9ABV9ATIJ0M4f+MXCU2 j8N8PVCB+aFDjQNFnHhtWyLd+ui70otEbvRMGzpOBV+A/uq5ZAgTk2nmOdYExpplNR+T 8OuYsJpjJkE94/wmOsnldvgkt9PUWPAQt0ZaNYhOm9VyOx6ZXVUekaWxnpf785eONBQ/ X3sLTgw/XQF31FkVU9AbsWq+2Qbce7R41mk7bIfdLm/ErUSGTjGs8qMn4O1mkgYHvCUu PWMBijZ1p1TJcHM3yd00DGXMCnCA6eXEMv8Y1y55MV6gJ91fo/gf57Qi9lNuqZRwEKEt 0E3g== MIME-Version: 1.0 Received: by 10.50.168.1 with SMTP id zs1mr11292243igb.45.1343063122532; Mon, 23 Jul 2012 10:05:22 -0700 (PDT) Received: by 10.64.25.162 with HTTP; Mon, 23 Jul 2012 10:05:22 -0700 (PDT) In-Reply-To: References: Date: Mon, 23 Jul 2012 13:05:22 -0400 Message-ID: Subject: Re: Structs in Hive From: Edward Capriolo To: user@hive.apache.org Content-Type: text/plain; charset=ISO-8859-1 in your case hbase has a custom serde, the Deserializer interface is what turns the value from the input format into something that hive can understand. HBase support uses the user specified table property columns.mapping as information for what it should parse out of the hbase result. On Mon, Jul 23, 2012 at 12:27 PM, kulkarni.swarnim@gmail.com wrote: > Hello, > > I kind of have a pretty basic question here. I am trying to read structs > stored in HBase to be read by Hive. In what format should these structs be > written so that they can be read? > > For instance, if my query has the following struct: > > s struct > > How should I be writing my data in HBase so that when read, it fits into > this struct? In other words, can I create my own class 'MyStruct' which is > something like: > > class MyStruct{ > string a; > string b; > } > > to create the struct bytes and read them using hive with the struct defined > above? I hope I made my question clear. I will be glad to provide any > clarifications. > > Thanks, > > -- > Swarnim