Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 068E8200B13 for ; Wed, 15 Jun 2016 13:30:40 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 050E9160A4D; Wed, 15 Jun 2016 11:30:40 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CB085160A4C for ; Wed, 15 Jun 2016 13:30:38 +0200 (CEST) Received: (qmail 29207 invoked by uid 500); 15 Jun 2016 11:30:37 -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 29194 invoked by uid 99); 15 Jun 2016 11:30:37 -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; Wed, 15 Jun 2016 11:30:37 +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 B6C9CC2257 for ; Wed, 15 Jun 2016 11:30:36 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.198 X-Spam-Level: * X-Spam-Status: No, score=1.198 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, 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-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 0LCl5-n7h0en for ; Wed, 15 Jun 2016 11:30:33 +0000 (UTC) Received: from mail-io0-f170.google.com (mail-io0-f170.google.com [209.85.223.170]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 594CC5F19D for ; Wed, 15 Jun 2016 11:30:32 +0000 (UTC) Received: by mail-io0-f170.google.com with SMTP id 5so19854089ioy.1 for ; Wed, 15 Jun 2016 04:30:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=4n9zsLhnzJrOWy1lLCY10+9ZAkAecdvQ8yX9tBoAmDU=; b=K8kiTPS1kt+DsJrKF/BbmqMV+7hqC3pN+kkmZG2262/flaiSqVZFGGOW8N/LPmzFK/ 7IsoVthFBgpJdv94Wj0/dkkzt5fZ9X808yHTjE8HxYkHs8LlZMnabddyEFkuxK0ee1fW V3uOYQ604EJA19d8OwMkZR4YVpwqC3joQI/0xClDVlFJnjfSDTZzH6JFqahn5Ada254E LyAAINLfaxYdAWr5WLznDmJZQOVM/RK8xukXkZyY+2mqU44onCbVzNQZgciKiyLV5emj w7MdfIOZbrmM2fQnp7Pn9Ub5+b16j7CXcgAtJzH7qLLdiP8+vO2+DTYknPWhXp8ZNdOQ 1PBg== 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:from:date :message-id:subject:to; bh=4n9zsLhnzJrOWy1lLCY10+9ZAkAecdvQ8yX9tBoAmDU=; b=RYe6Qm+FLmddX75xwmD0X0XC4r9r7Igo8NpoXcUfmkMTAyHDtGdEsxB8v6ta33jamn 6kI5BUd7R35Oi94VfTawvxuejoDxaPGjzzF8EZ902AeCX/SzxqTzZaV9s1mOCN0In8Tj ls4q3YrNroWrwYk1659I2R8nOfaamystr6ShEcfR5t0VR5JghBRkjXCHaHx9CwdyksA4 Vbopo3CNpjZ8e/8c7RPksnfz/Etic/UJQbufYtgM20zFH35ppnWqXzeL4x/HPk+kP0Jq Shfpho+MXLr3m38O51/NsNlykvMPQqSszdbiWgm4+K4P1K1KszE9aP59p54x0e5qtclJ jlPg== X-Gm-Message-State: ALyK8tLedViOSGOA9/QWCgcpmWXMW746+fFUik28LXkymeIzkPQSt65gEwO78UXsKeUb4oy9a2Eq7epZ5jf0gw== X-Received: by 10.107.205.8 with SMTP id d8mr24226352iog.113.1465990231092; Wed, 15 Jun 2016 04:30:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.146.214 with HTTP; Wed, 15 Jun 2016 04:30:30 -0700 (PDT) In-Reply-To: <877F60814215D949AD1D8CF44C6AC1C709CB58055E@CLFMPEXMBX02.Markets.Global.Lloydstsb.Com> References: <877F60814215D949AD1D8CF44C6AC1C709CB58053E@CLFMPEXMBX02.Markets.Global.Lloydstsb.Com> <877F60814215D949AD1D8CF44C6AC1C709CB58053F@CLFMPEXMBX02.Markets.Global.Lloydstsb.Com> <877F60814215D949AD1D8CF44C6AC1C709CB58055D@CLFMPEXMBX02.Markets.Global.Lloydstsb.Com> <877F60814215D949AD1D8CF44C6AC1C709CB58055E@CLFMPEXMBX02.Markets.Global.Lloydstsb.Com> From: ramkrishna vasudevan Date: Wed, 15 Jun 2016 17:00:30 +0530 Message-ID: Subject: Re: Writing visibility labels with HFileOutputFormat2 To: "user@hbase.apache.org" Content-Type: multipart/alternative; boundary=94eb2c1880dcf7f34305354f7298 archived-at: Wed, 15 Jun 2016 11:30:40 -0000 --94eb2c1880dcf7f34305354f7298 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable >>We could I guess create multiple puts for cells in the same row with different labels and use the setCellVisibility on each individual put/cell, but will this create additional overhead? This can be done. If you want different cells in the same row to have different labels then it is better to create those many puts and setCellVisibility on each of them. What type of overhead you see here? In terms of the server processing them? If so there should not be much overhead here and also adding different cells to every column inturn means you need every cell to be treated differenly in terms of security. so should be fine IMHO. Without doing put.setCellvisibility() there is no other way I believe. One question regarding your use case Now in the mail you had told about the spark job where you will create a bulk loaded file. Now if that is to have all the visibility related information of all the cells then the user doing this job should be an admin or super user right Why is the case that a normal client user will read through all the visibility cells which may or may not be associated with that user? Thank you very much for testing and using this feature. LEt us know your feedback and if you find any gaps here. Happy to help. Regards Ram On Wed, Jun 15, 2016 at 4:09 PM, Ellis, Tom (Financial Markets IT) < Tom.Ellis@lloydsbanking.com.invalid> wrote: > Hmm, is there no other way to set labels on individual cells where we > don't have to give the client users system perms? For instance, client > users can set the cell visibility on the entire put without having this > (i.e. put.setCellVisibility("label")) and the VisibilityController will > check this. > > We could I guess create multiple puts for cells in the same row with > different labels and use the setCellVisibility on each individual put/cel= l, > but will this create additional overhead? > > Cheers, > > Tom Ellis > Consultant Developer =E2=80=93 Excelian > Data Lake | Financial Markets IT > LLOYDS BANK COMMERCIAL BANKING > > > E: Tom.Ellis@LloydsBanking.com > Website: www.lloydsbankcommercial.com > , , , > Reduce printing. Lloyds Banking Group is helping to build the low carbon > economy. > Corporate Responsibility Report: www.lloydsbankinggroup-cr.com/downloads > > > -----Original Message----- > From: ramkrishna vasudevan [mailto:ramkrishna.s.vasudevan@gmail.com] > Sent: 15 June 2016 11:24 > To: user@hbase.apache.org > Subject: Re: Writing visibility labels with HFileOutputFormat2 > > -- This email has reached the Bank via an external source -- > > > The visibility expression resolver tries to scan the labels table and the > user using the resolver should have the SYSTEM privileges. Since the > information that is getting accessed is sensitive information. > > Suppose in your above case you have the client user added as a an admin > then when you scan the label table you should be able to scan it. > > Regards > Ram > > On Wed, Jun 15, 2016 at 3:09 PM, Ellis, Tom (Financial Markets IT) < > Tom.Ellis@lloydsbanking.com.invalid> wrote: > > > Yeah, thanks for this Ram. Although in my testing I have found that a > > client user attempting to use the visibility expression resolver > > doesn't seem to have the ability to scan the hbase:labels table for > > the full list of labels and thus can't get the ordinals/tags to add to > > the cell. Does the client user attempting to use the > > VisibilityExpressionResolver have to have some special permissions? > > > > Scan of hbase:labels by client user: > > > > hbase(main):003:0> scan 'hbase:labels' > > ROW COLUMN+CELL > > \x00\x00\x00\x01 column=3Df:\x00, > > timestamp=3D1465216652662, value=3Dsystem > > 1 row(s) in 0.0650 seconds > > > > Scan of hbase:labels by hbase user: > > > > hbase(main):001:0> scan 'hbase:labels' > > ROW COLUMN+CELL > > \x00\x00\x00\x01 column=3Df:\x00, > > timestamp=3D1465216652662, value=3Dsystem > > \x00\x00\x00\x02 column=3Df:\x00, > > timestamp=3D1465216944935, value=3Dprotected > > \x00\x00\x00\x02 column=3Df:hbase, > > timestamp=3D1465547138533, value=3D > > \x00\x00\x00\x02 column=3Df:tom, > > timestamp=3D1465980236882, value=3D > > \x00\x00\x00\x03 column=3Df:\x00, > > timestamp=3D1465500156667, value=3Dtesttesttest > > \x00\x00\x00\x03 column=3Df:@hadoop, > > timestamp=3D1465980236967, value=3D > > \x00\x00\x00\x03 column=3Df:hadoop, > > timestamp=3D1465547304610, value=3D > > \x00\x00\x00\x03 column=3Df:hive, > > timestamp=3D1465501322616, value=3D > > \x00\x00\x00\x04 column=3Df:\x00, > > timestamp=3D1465570719901, value=3Dconfidential > > \x00\x00\x00\x05 column=3Df:\x00, > > timestamp=3D1465835047835, value=3Dbranch > > \x00\x00\x00\x05 column=3Df:hdfs, > > timestamp=3D1465980237060, value=3D > > \x00\x00\x00\x06 column=3Df:\x00, > > timestamp=3D1465980447307, value=3Dgroup > > \x00\x00\x00\x06 column=3Df:hdfs, > > timestamp=3D1465980454130, value=3D > > 6 row(s) in 0.7370 seconds > > > > Cheers, > > > > Tom Ellis > > Consultant Developer =E2=80=93 Excelian > > Data Lake | Financial Markets IT > > LLOYDS BANK COMMERCIAL BANKING > > > > > > E: Tom.Ellis@LloydsBanking.com > > Website: www.lloydsbankcommercial.com > > , , , > > Reduce printing. Lloyds Banking Group is helping to build the low > > carbon economy. > > Corporate Responsibility Report: > > www.lloydsbankinggroup-cr.com/downloads > > > > -----Original Message----- > > From: Anoop John [mailto:anoop.hbase@gmail.com] > > Sent: 08 June 2016 11:58 > > To: user@hbase.apache.org > > Subject: Re: Writing visibility labels with HFileOutputFormat2 > > > > -- This email has reached the Bank via an external source -- > > > > > > Thanks Ram.. Ya that seems the best way as CellCreator is public > > exposed class. May be we should explain abt this in hbase book under > > the Visibility labels area. Good to know you have Visibility labels > > based usecase. Let us know in case of any trouble. Thanks. > > > > -Anoop- > > > > On Wed, Jun 8, 2016 at 1:43 PM, ramkrishna vasudevan < > > ramkrishna.s.vasudevan@gmail.com> wrote: > > > Hi > > > > > > It can be done. See the class CellCreator which is Public facing > > interface. > > > When you create your spark job to create the hadoop files that > > > produces the > > > HFileOutputformat2 data. While creating the KeyValues you can use > > > the CellCreator to create your KeyValues and use the > > > CellCreator.getVisibilityExpressionResolver() to map your String > > > Visibility tags with the system generated ordinals. > > > > > > For eg, you can see how TextSortReducer works. I think this should > > > help you solve your problem. Let us know if you need further > information. > > > > > > Regards > > > Ram > > > > > > On Tue, Jun 7, 2016 at 3:58 PM, Ellis, Tom (Financial Markets IT) < > > > Tom.Ellis@lloydsbanking.com.invalid> wrote: > > > > > >> Hi Ram, > > >> > > >> We're attempting to do it programmatically so: > > >> > > >> The HFile is created by a Spark job using saveAsNewAPIHadoopFile, > > >> and using ImmutableBytesWritable as the key (rowkey) with KeyValue > > >> as the value, and using the HFilOutputFormat2 format. > > >> This HFile is then loaded using HBase client's > > >> LoadIncrementalHFiles.doBulkLoad > > >> > > >> Is there a way to do this programmatically without using the > > >> ImportTsv tool? I was taking a look at > > >> VisibilityUtils.createVisibilityExpTags and maybe being able to > > >> just create the Tags myself that way (although it's obviously > > >> @InterfaceAudience.Private) but it seems to be able to use that I'd > > need to know Label ordinality client side.. > > >> > > >> Thanks for your help, > > >> > > >> Tom > > >> > > >> -----Original Message----- > > >> From: ramkrishna vasudevan > > >> [mailto:ramkrishna.s.vasudevan@gmail.com] > > >> Sent: 07 June 2016 11:19 > > >> To: user@hbase.apache.org > > >> Subject: Re: Writing visibility labels with HFileOutputFormat2 > > >> > > >> -- This email has reached the Bank via an external source -- > > >> > > >> > > >> Hi Ellis > > >> > > >> How is the HFileOutputFormat2 files created? Are you using the > > >> ImportTsv tool? If you are using the ImportTsv tool then yes there > > >> is a way to specify visibility tags while loading from the > > >> ImportTsv tool and those visibility tags are also bulk loaded as > HFile. > > >> > > >> There is an attribute CELL_VISIBILITY_COLUMN_SPEC that can be used > > >> to indicate that the data will have Visibility Tags and the tool > > >> will automatically parse the specified field as Visibility Tag. > > >> > > >> In case you have access to the code you can see the test case > > >> TestImportTSVWithVisibilityLabels to get an initial idea of how it > > >> is being done. If not get back to us, happy to help . > > >> > > >> Regards > > >> Ram > > >> > > >> > > >> > > >> On Tue, Jun 7, 2016 at 3:36 PM, Ellis, Tom (Financial Markets IT) < > > >> Tom.Ellis@lloydsbanking.com.invalid> wrote: > > >> > > >> > Hi, > > >> > > > >> > I was wondering if it's possible/how to write Visibility Labels > > >> > to an HFileOutputFormat2? I believe Visibility Labels are just > > >> > implemented as Tags, but with the normal way of writing them with > > >> > Mutation#setCellVisibility these are formally written as Tags to > > >> > the cells during the VisibilityController coprocessor as we need > > >> > to assert the expression is valid for the labels configured. > > >> > > > >> > How can we add visibility labels to cells if we have a job that > > >> > creates an HFile with HFileOutputFormat2 which is then > > >> > subsequently loaded using LoadIncrementalHFiles? > > >> > > > >> > Cheers, > > >> > > > >> > Tom Ellis > > >> > Consultant Developer - Excelian > > >> > Data Lake | Financial Markets IT > > >> > LLOYDS BANK COMMERCIAL BANKING > > >> > ________________________________ > > >> > > > >> > E: > > >> > Tom.Ellis@LloydsBanking.com > > >> > Website: > > >> > www.lloydsbankcommercial.com > >> > > > > >> > , , , > > >> > Reduce printing. Lloyds Banking Group is helping to build the low > > >> > carbon economy. > > >> > Corporate Responsibility Report: > > >> > www.lloydsbankinggroup-cr.com/downloads< > > >> > http://www.lloydsbankinggroup-cr.com/downloads> > > >> > > > >> > > > >> > > > >> > Lloyds Banking Group plc. Registered Office: The Mound, Edinburgh > > >> > EH1 > > >> 1YZ. > > >> > Registered in Scotland no. SC95000. Telephone: 0131 225 4555. > > >> > Lloyds Bank plc. Registered Office: 25 Gresham Street, London > > >> > EC2V > > 7HN. > > >> > Registered in England and Wales no. 2065. Telephone 0207626 1500. > > >> > Bank > > >> of Scotland plc. > > >> > Registered Office: The Mound, Edinburgh EH1 1YZ. Registered in > > >> > Scotland > > >> no. > > >> > SC327000. Telephone: 03457 801 801. Cheltenham & Gloucester plc. > > >> > Registered > > >> > Office: Barnett Way, Gloucester GL4 3RL. Registered in England > > >> > and Wales 2299428. Telephone: 0345 603 1637 > > >> > > > >> > Lloyds Bank plc, Bank of Scotland plc are authorised by the > > >> > Prudential Regulation Authority and regulated by the Financial > > >> > Conduct Authority and Prudential Regulation Authority. > > >> > > > >> > Cheltenham & Gloucester plc is authorised and regulated by the > > >> > Financial Conduct Authority. > > >> > > > >> > Halifax is a division of Bank of Scotland plc. Cheltenham & > > >> > Gloucester Savings is a division of Lloyds Bank plc. > > >> > > > >> > HBOS plc. Registered Office: The Mound, Edinburgh EH1 1YZ. > > >> > Registered in Scotland no. SC218813. > > >> > > > >> > This e-mail (including any attachments) is private and > > >> > confidential and may contain privileged material. If you have > > >> > received this e-mail in error, please notify the sender and > > >> > delete it (including any > > >> > attachments) immediately. You must not copy, distribute, disclose > > >> > or use any of the information in it or any attachments. Telephone > > >> > calls may be monitored or recorded. > > >> > > > >> > > >> > > >> Lloyds Banking Group plc. Registered Office: The Mound, Edinburgh > > >> EH1 > > 1YZ. > > >> Registered in Scotland no. SC95000. Telephone: 0131 225 4555. > > >> Lloyds Bank plc. Registered Office: 25 Gresham Street, London EC2V > 7HN. > > >> Registered in England and Wales no. 2065. Telephone 0207626 1500. > > >> Bank > > of Scotland plc. > > >> Registered Office: The Mound, Edinburgh EH1 1YZ. Registered in > > >> Scotland > > no. > > >> SC327000. Telephone: 03457 801 801. Cheltenham & Gloucester plc. > > >> Registered > > >> Office: Barnett Way, Gloucester GL4 3RL. Registered in England and > > >> Wales 2299428. Telephone: 0345 603 1637 > > >> > > >> Lloyds Bank plc, Bank of Scotland plc are authorised by the > > >> Prudential Regulation Authority and regulated by the Financial > > >> Conduct Authority and Prudential Regulation Authority. > > >> > > >> Cheltenham & Gloucester plc is authorised and regulated by the > > >> Financial Conduct Authority. > > >> > > >> Halifax is a division of Bank of Scotland plc. Cheltenham & > > >> Gloucester Savings is a division of Lloyds Bank plc. > > >> > > >> HBOS plc. Registered Office: The Mound, Edinburgh EH1 1YZ. > > >> Registered in Scotland no. SC218813. > > >> > > >> This e-mail (including any attachments) is private and confidential > > >> and may contain privileged material. If you have received this > > >> e-mail in error, please notify the sender and delete it (including > > >> any > > >> attachments) immediately. You must not copy, distribute, disclose > > >> or use any of the information in it or any attachments. Telephone > > >> calls may be monitored or recorded. > > >> > > > > > > Lloyds Banking Group plc. Registered Office: The Mound, Edinburgh EH1 > 1YZ. > > Registered in Scotland no. SC95000. Telephone: 0131 225 4555. Lloyds > > Bank plc. Registered Office: 25 Gresham Street, London EC2V 7HN. > > Registered in England and Wales no. 2065. Telephone 0207626 1500. Bank > of Scotland plc. > > Registered Office: The Mound, Edinburgh EH1 1YZ. Registered in Scotland > no. > > SC327000. Telephone: 03457 801 801. Cheltenham & Gloucester plc. > > Registered > > Office: Barnett Way, Gloucester GL4 3RL. Registered in England and > > Wales 2299428. Telephone: 0345 603 1637 > > > > Lloyds Bank plc, Bank of Scotland plc are authorised by the Prudential > > Regulation Authority and regulated by the Financial Conduct Authority > > and Prudential Regulation Authority. > > > > Cheltenham & Gloucester plc is authorised and regulated by the > > Financial Conduct Authority. > > > > Halifax is a division of Bank of Scotland plc. Cheltenham & Gloucester > > Savings is a division of Lloyds Bank plc. > > > > HBOS plc. Registered Office: The Mound, Edinburgh EH1 1YZ. Registered > > in Scotland no. SC218813. > > > > This e-mail (including any attachments) is private and confidential > > and may contain privileged material. If you have received this e-mail > > in error, please notify the sender and delete it (including any > > attachments) immediately. You must not copy, distribute, disclose or > > use any of the information in it or any attachments. Telephone calls > > may be monitored or recorded. > > > > > Lloyds Banking Group plc. Registered Office: The Mound, Edinburgh EH1 1YZ= . > Registered in Scotland no. SC95000. Telephone: 0131 225 4555. Lloyds Bank > plc. Registered Office: 25 Gresham Street, London EC2V 7HN. Registered in > England and Wales no. 2065. Telephone 0207626 1500. Bank of Scotland plc. > Registered Office: The Mound, Edinburgh EH1 1YZ. Registered in Scotland n= o. > SC327000. Telephone: 03457 801 801. Cheltenham & Gloucester plc. Register= ed > Office: Barnett Way, Gloucester GL4 3RL. Registered in England and Wales > 2299428. Telephone: 0345 603 1637 > > Lloyds Bank plc, Bank of Scotland plc are authorised by the Prudential > Regulation Authority and regulated by the Financial Conduct Authority and > Prudential Regulation Authority. > > Cheltenham & Gloucester plc is authorised and regulated by the Financial > Conduct Authority. > > Halifax is a division of Bank of Scotland plc. Cheltenham & Gloucester > Savings is a division of Lloyds Bank plc. > > HBOS plc. Registered Office: The Mound, Edinburgh EH1 1YZ. Registered in > Scotland no. SC218813. > > This e-mail (including any attachments) is private and confidential and > may contain privileged material. If you have received this e-mail in erro= r, > please notify the sender and delete it (including any attachments) > immediately. You must not copy, distribute, disclose or use any of the > information in it or any attachments. Telephone calls may be monitored or > recorded. > --94eb2c1880dcf7f34305354f7298--