Return-Path: X-Original-To: apmail-hbase-user-archive@www.apache.org Delivered-To: apmail-hbase-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 6492110D04 for ; Fri, 9 Aug 2013 19:50:51 +0000 (UTC) Received: (qmail 39507 invoked by uid 500); 9 Aug 2013 19:50:48 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 39433 invoked by uid 500); 9 Aug 2013 19:50:47 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 39425 invoked by uid 99); 9 Aug 2013 19:50:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Aug 2013 19:50:47 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of yuzhihong@gmail.com designates 209.85.215.51 as permitted sender) Received: from [209.85.215.51] (HELO mail-la0-f51.google.com) (209.85.215.51) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Aug 2013 19:50:42 +0000 Received: by mail-la0-f51.google.com with SMTP id fp13so3326287lab.10 for ; Fri, 09 Aug 2013 12:50:20 -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=1lrxoE8r/nluYROqvhprAhHim/0IahrqTGeccC51L5o=; b=a3nhPj6ZBBXbvZJ/M7rTTBBbzhoW9SzedUhmi7HRihJV19r/movOXJiAILkapehlBt MfOFMgGay6zIWGrCHzDJxpC4RjfPwB6B6vK59ytD83wDvsms0/UMwoPByaVGkP9eLeN4 vnKxslWhVQI98FXKuERSch4bgTsyw9Qm3AqiWsL92olDJRsUK+ru3SR60Bsu/pktE2xY 4Q9E+3o8ZU4WGsmPnQV0NguvhB53bjgizQGXmKYcwGXfkJ39jvlwRnxagYxRA5G4zI1O vUMM1oFVAasOEw6zCLCHNAYuFSrstO0qoHxONHZfApQ7ZPuSh8Jyl1mMADPUQebRL8Bk uTvw== MIME-Version: 1.0 X-Received: by 10.112.56.177 with SMTP id b17mr5144590lbq.74.1376077820757; Fri, 09 Aug 2013 12:50:20 -0700 (PDT) Received: by 10.112.129.40 with HTTP; Fri, 9 Aug 2013 12:50:20 -0700 (PDT) In-Reply-To: References: Date: Fri, 9 Aug 2013 12:50:20 -0700 Message-ID: Subject: Re: Hadoop-HBase table hierarchical column scan From: Ted Yu To: user@hbase.apache.org Content-Type: multipart/alternative; boundary=001a1133ab8ab08dee04e3891588 X-Virus-Checked: Checked by ClamAV on apache.org --001a1133ab8ab08dee04e3891588 Content-Type: text/plain; charset=ISO-8859-1 I think you need to place 'source' and 'name' as separate columns in 'DFLT' Cheers On Fri, Aug 9, 2013 at 12:44 PM, Narlin M wrote: > I am fairly new to the hadoop-hbase environment having started working on > it very recently, so I hope I am wording the question correctly. > > I am trying to read data from a hadoop-hbase table which has only one > column family named 'DFLT'. This family contains hierarchical column > qualifiers "/source:int64/name:string". I want to read the name column for > a particular source value, say 10. How can I achieve this using the Scan > class? > > I tried setting up the scan object as follows: > > ... > > byte[] family = Bytes.toBytes("DFLT"); > byte[] qualifier = Bytes.toBytes("source:name"); > > Scan scan = new Scan(); > scan.addColumn(family, qualifier); > > FilterList list = new FilterList(FilterList.Operator.MUST_PASS_ALL); > > SingleColumnValueFilter filter = new SingleColumnValueFilter(family, > Bytes.toBytes("source"), CompareFilter.CompareOp.EQUAL,Bytes.toBytes(10)); > > list.addFilter(filter); > > scan.setFilter(list); > > ... > > > But I do not get any data back with this setup. I am guessing that I am not > setting up the hierarchical qualifiers correctly. Any and all pointers will > be appreciated. > > Thanks, Narlin M. > --001a1133ab8ab08dee04e3891588--