From user-return-51282-apmail-hbase-user-archive=hbase.apache.org@hbase.apache.org Tue May 3 17:35:15 2016 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 74448198B4 for ; Tue, 3 May 2016 17:35:15 +0000 (UTC) Received: (qmail 92543 invoked by uid 500); 3 May 2016 17:35:13 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 92470 invoked by uid 500); 3 May 2016 17:35:13 -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 92458 invoked by uid 99); 3 May 2016 17:35:13 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 May 2016 17:35:13 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id D959FC9B76 for ; Tue, 3 May 2016 17:35:12 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-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_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id maEtulUu4pqw for ; Tue, 3 May 2016 17:35:09 +0000 (UTC) Received: from mail-yw0-f181.google.com (mail-yw0-f181.google.com [209.85.161.181]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 0A5185FD0E for ; Tue, 3 May 2016 17:35:08 +0000 (UTC) Received: by mail-yw0-f181.google.com with SMTP id t10so32010123ywa.0 for ; Tue, 03 May 2016 10:35:08 -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; bh=9pouEE5+QwEpdnQc626hB9vKdtiI4Cw7loEpYKwNgXM=; b=kpFDg1lo6YJvVbKuf1bUGXEa+8gEaRoFXnrL6H2qCWtBnOAd8O3HoXyAaYm0wxvqul o3amy2APQ1ifyCunm/nTWSYZR/osW6jh/vLQ91RJUtvqZ5wdgyEJ1cOYAmWKaXHWeTCt N8hc7oyk8pHWRRjicD1P7Bo3Ixli/hdPzwLaZ5x+xYk7Gvta6VIblG+Tonqi1b3quCrm fMuJbuSuVgJJhmHQwhNL3WRZebvAjo2ONckNKcUyt5rcPy5JCW4hA6T4A9gqIsCpVgb3 Qe6cANlQnf/J96I7InFBqoJkcz/k7Yyy3F2yStfAQweQQan6ijSwrh2Dz5OSYMYu5VsR cGHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=9pouEE5+QwEpdnQc626hB9vKdtiI4Cw7loEpYKwNgXM=; b=f9WVnc7vbY7zWGDszzJCZvGPybrWuEwb/FEtC+IZj2v2akS7X8lXw13Qs5/xSq5+hw 69eVsDh6bHieDH1RdEk4+5NNsDCV0mZba2ZUt9jKm2Lkd1tK4Le8d7RUApY4MpAhJCZg 2+QJEJn7bmn7OtsL9C7l9l5u6fQQIo5ZhoSm0TwO5y8HW1Qv8mL153taxrNIlc9MIL9B 8dm8yyxnkl+eWoVHwB80SVKAx+g6upkTuXhmNvYoGnkHySL428GnVc4TyAkNq+G1gIxW vQclZa+S24mW119l1LWQjKXcMeziIYjEey1JWmR08VftDD2T3BVAzVbB81dHyq+qZhZ4 dqmg== X-Gm-Message-State: AOPr4FWqyY53Whwvl1Jhkg9Pwhzzuh1jOIfTicCllFSiAY5rsXL0ivYsvGwgqkpqteWNLzYeqSV/IZpBs0bR4A== MIME-Version: 1.0 X-Received: by 10.176.64.133 with SMTP id i5mr1820249uad.12.1462296907973; Tue, 03 May 2016 10:35:07 -0700 (PDT) Received: by 10.159.55.163 with HTTP; Tue, 3 May 2016 10:35:07 -0700 (PDT) In-Reply-To: References: <4C86198BF10EF549BC496C7F215A9CC70CBCCFE2@C111MFBLMBX07.ERF.thomson.com> Date: Tue, 3 May 2016 23:05:07 +0530 Message-ID: Subject: Re: Access cell tags from HBase shell From: Anoop John To: "user@hbase.apache.org" Content-Type: text/plain; charset=UTF-8 You have to config the Codec KeyValueCodecWithTags at client side. Server also will use same Codec to talk with this client. Ya just check with a java client 1st and then experiment with shell. -Anoop- On Tue, May 3, 2016 at 9:43 PM, ramkrishna vasudevan wrote: > Hi Benedict > > As super user you should be able to get back the tags as ordinals and make > sure you set the codec KeyValueCodecWithTags. > But I am not sure if it is possible to do it from the hBase shell. Can you > try from a java client ? > > I did not do the hands on of late on this but I can do it if you face any > difficulties and revert back if needed. > > Regards > Ram > > On Tue, May 3, 2016 at 8:19 PM, > wrote: > >> Hi Anoop, >> >> Can I still get the labels back (as ordinals, as a super user, and using >> the KeyValueCodecWithTags codec) using the HBase shell? >> >> If so, what are the steps I need to take (i.e. doesn't seem to be working >> for me, but then I've likely made a mistake setting the codec). >> >> Thanks, >> >> Ben >> >> > -----Original Message----- >> > From: Anoop John [mailto:anoop.hbase@gmail.com] >> > Sent: 15 September 2015 14:28 >> > To: user@hbase.apache.org >> > Subject: Re: Access cell tags from HBase shell >> > >> > We are not returning back the cell labels back to client. So what I >> > will >> > recommend you to test is by having a predicate in scan and test you see >> > only the relevant data back. >> > But there is way to return cells (all*) with out any vis check and >> > cells in >> > client will have the vis label tag also in it. This is by issuing the >> > scan >> > as a super user. And also set the codec as KeyValueCodecWithTags. >> > But one thing we wont be storing the vis label with Cells as string.. >> > We >> > will optimize.. We will store them as ordinals and & and | condition >> > also >> > we will optimize. So even if you read back the vis label tags back in >> > client it will be hard to parse it and understand.. Any thing more you >> > would like to know, pls let me know.. Will be happy to help. >> > >> > BTW once you test and if start to use the feature pls let me know.. >> > Will >> > be great to hear the usage cases and feedback. >> > >> > -Anoop- >> > >> > >> > On Fri, Sep 11, 2015 at 5:35 AM, Suresh Subbiah >> > >> > wrote: >> > >> > > Hi Anoop, >> > > >> > > Thank you very much for the offer to help. >> > > >> > > I have been thinking some more about what it is that we need to do >> > and have >> > > realized that we don't need custom cell tags. >> > > We we will only be using visibility labels. This is basically for >> > testing >> > > purpose and to understand exactly how data looks. >> > > >> > > How do we see visibility labels that are applied to a particular >> > cell? For >> > > ex, if we want to know all the labels that have been applied to >> > > all cells, how do we do that? Or can that only be done by applying a >> > > predicate and then check to see if the pred passes? >> > > >> > > Is there a way to pass visibility labels to client is a test mode ? >> > > >> > > Thanks >> > > Suresh >> > > >> > > >> > > On Thu, Sep 3, 2015 at 11:07 PM, Anoop John >> > wrote: >> > > >> > > > Hi Suresh >> > > > You wan to use ur own custom tags with cells? The >> > > features >> > > > like cell level vis labels etc are also implemented by storing them >> > as >> > > cell >> > > > tags. Yes as others said, the tags is by default a server only >> > thing. >> > > > Means you can not pass tags from/to client along with cells. There >> > is >> > > some >> > > > security reasons why we had opted this path. And there were no >> > custom >> > > tag >> > > > needs by then. Pls let us know what you want to achieve. There is >> > ways >> > > to >> > > > pass tags to/from client. I can help you. >> > > > >> > > > -Anoop- >> > > > >> > > > >> > > > On Tue, Sep 1, 2015 at 4:29 AM, Jerry He >> > wrote: >> > > > >> > > > > Hi, Suresh >> > > > > >> > > > > In you Java client program, you can 'label' the cells in your >> > PUT. You >> > > > can >> > > > > ask which labeled cells to be returned in your Get and Scan, but >> > the >> > > > labels >> > > > > are not returned with the cells. >> > > > > Yes, "labels on cells are only interpreted server side" >> > > > > >> > > > > >> > > > > Jerry >> > > > > >> > > > > On Mon, Aug 31, 2015 at 1:27 PM, Suresh Subbiah < >> > > > > suresh.subbiah60@gmail.com> >> > > > > wrote: >> > > > > >> > > > > > Thank you very much Ted, Jean-Marc. >> > > > > > >> > > > > > I see that slide 4 in >> > > > > > https://urldefense.proofpoint.com/v2/url?u=http- >> > 3A__www.slideshare.net_HBaseCon_features-2Dsession- >> > 2D2&d=CwIBaQ&c=4ZIZThykDLcoWk- >> > GVjSLm9hvvvzvGv0FLoWSRuCSs5Q&r=GQ6xvz2BG1vCgiGGeLHdL1qJLbLUqYG6W19eFBlz >> > nzDGH3wjzyriGVJemENTKsgx&m=sLIg484DFLi0oSu5ylkGuIuB- >> > re6sXaYY0fb9BreY2o&s=BhpulFRnZ_JNgAOPjb_MFtv0rnH9yaNXtQZE_g7y-28&e= >> > states >> > > > > > that "cells are only interpreted server side" >> > > > > > However https://urldefense.proofpoint.com/v2/url?u=https- >> > 3A__issues.apache.org_jira_browse_HBASE- >> > 2D9056&d=CwIBaQ&c=4ZIZThykDLcoWk- >> > GVjSLm9hvvvzvGv0FLoWSRuCSs5Q&r=GQ6xvz2BG1vCgiGGeLHdL1qJLbLUqYG6W19eFBlz >> > nzDGH3wjzyriGVJemENTKsgx&m=sLIg484DFLi0oSu5ylkGuIuB- >> > re6sXaYY0fb9BreY2o&s=u_ISxz2OpkFA6Y5cYXGcQqpG24S54zDi1WhuHfbq18A&e= & >> > > > > > https://urldefense.proofpoint.com/v2/url?u=https- >> > 3A__issues.apache.org_jira_browse_HBASE- >> > 2D9884&d=CwIBaQ&c=4ZIZThykDLcoWk- >> > GVjSLm9hvvvzvGv0FLoWSRuCSs5Q&r=GQ6xvz2BG1vCgiGGeLHdL1qJLbLUqYG6W19eFBlz >> > nzDGH3wjzyriGVJemENTKsgx&m=sLIg484DFLi0oSu5ylkGuIuB- >> > re6sXaYY0fb9BreY2o&s=eiGA0TFAu3Or3cbLjX0wQJjwUGxldTOwU00qfZOgO8s&e= >> > (likely others) >> > > seem >> > > > to >> > > > > > indicate that tag values can be accessed/mutated from HBase >> > client >> > > > > > programs. >> > > > > > I assumed that this mean that code has evolved since the slides >> > were >> > > > > > created. Or I could just be misunderstanding what the slide >> > meant. >> > > > > > >> > > > > > I am hoping to write some kind of small java program to do this >> > now >> > > > > (since >> > > > > > I am not familiar with REST or Thrift). Do you think that is a >> > > > reasonable >> > > > > > approach? >> > > > > > >> > > > > > Thanks >> > > > > > Suresh >> > > > > > >> > > > > > >> > > > > > On Mon, Aug 31, 2015 at 2:59 PM, Ted Yu >> > wrote: >> > > > > > >> > > > > > > bq. retrieve the list of labels for a given cell >> > > > > > > >> > > > > > > You're right, J-M. >> > > > > > > There is no facility for the above in hbase shell. >> > > > > > > >> > > > > > > On Mon, Aug 31, 2015 at 12:55 PM, Jean-Marc Spaggiari < >> > > > > > > jean-marc@spaggiari.org> wrote: >> > > > > > > >> > > > > > > > But I don't think you can retrieve the list of labels for a >> > given >> > > > > cell, >> > > > > > > > right? Cells are only interpreted server side and are not >> > > returned >> > > > on >> > > > > > the >> > > > > > > > client side... >> > > > > > > > >> > > > > > > > 2015-08-31 15:52 GMT-04:00 Ted Yu : >> > > > > > > > >> > > > > > > > > From the help message of put command, you can see the >> > > following: >> > > > > > > > > >> > > > > > > > > hbase> put 't1', 'r1', 'c1', 'value', ts1, >> > > > > > > > {VISIBILITY=>'PRIVATE|SECRET'} >> > > > > > > > > >> > > > > > > > > Here is the group of related commands: >> > > > > > > > > >> > > > > > > > > 'visibility labels', >> > > > > > > > > :full_name => 'VISIBILITY LABEL TOOLS', >> > > > > > > > > :comment => "NOTE: Above commands are only applicable >> > if >> > > > running >> > > > > > with >> > > > > > > > the >> > > > > > > > > VisibilityController coprocessor", >> > > > > > > > > :commands => %w[ >> > > > > > > > > add_labels >> > > > > > > > > list_labels >> > > > > > > > > set_auths >> > > > > > > > > get_auths >> > > > > > > > > clear_auths >> > > > > > > > > set_visibility >> > > > > > > > > >> > > > > > > > > FYI >> > > > > > > > > >> > > > > > > > > On Mon, Aug 31, 2015 at 12:25 PM, Suresh Subbiah < >> > > > > > > > > suresh.subbiah60@gmail.com >> > > > > > > > > > wrote: >> > > > > > > > > >> > > > > > > > > > Hi, >> > > > > > > > > > >> > > > > > > > > > I am using HBase 0.98 with HFiles of majorVersion 3. >> > > > > > > > > > Is it possible to get and set cell tags from the HBase >> > shell >> > > > > > utility? >> > > > > > > > > > I have been looking at various JIRAs and see some >> > example >> > > > client >> > > > > > > > testing >> > > > > > > > > > programs that seem to do this. However it will be >> > simpler if >> > > I >> > > > > > could >> > > > > > > > > > get/set cell tags from HBase shell. >> > > > > > > > > > >> > > > > > > > > > Thank you for your help. >> > > > > > > > > > >> > > > > > > > > > Best regards, >> > > > > > > > > > Suresh >> > > > > > > > > > >> > > > > > > > > >> > > > > > > > >> > > > > > > >> > > > > > >> > > > > >> > > > >> > > >>