ACE(Access Control Expressions) to specified column in MapR-DB

Document created by vmeghraj Employee on Sep 30, 2016
Version 1Show Document
  • View in full screen mode

Steps to add ACE(Access Control Expressions) to specified column in MapR-DB

 

Step 1) Create users 'mapr' and 'juser'

[mapr@vn1 logs]$ id mapr
uid=5000(mapr) gid=5000(mapr) groups=5000(mapr),5001(shadow)
[mapr@vn1 logs]$ id juser
uid=5002(juser) gid=5005(test) groups=5005(test)

 

Step 2) Create table

[mapr@vn1 logs]$ maprcli table create -path /user/ace1 -adminaccessperm 'u:mapr' -createrenamefamilyperm 'u:mapr'

 

Step 3) Add column families to table

[mapr@vn1 logs]$ maprcli table cf create -path /user/ace1 -cfname test1 -readperm 'u:mapr|u:juser'
[mapr@vn1 logs]$ maprcli table cf create -path /user/ace1 -cfname test2 -readperm 'u:mapr|u:juser'

 

Step 4) Add column to column families and insert sample data

[mapr@vn1 logs]$ hbase shell
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 1.1.1-mapr-1602, rb861ca48ca25c69cf7f02b64b7a3d5c92dc310c5, Mon Feb 22 20:52:10 UTC 2016
Not all HBase shell commands are applicable to MapR tables.
Consult MapR documentation for the list of supported commands.
hbase(main):001:0> put '/user/ace1', '1000', 'test1:name', 'MapR'
0 row(s) in 0.0890 seconds
hbase(main):002:0> put '/user/ace1', '1001', 'test1:group', 'Hadoop'
0 row(s) in 0.0150 seconds
hbase(main):003:0> scan '/user/ace1'
ROW COLUMN+CELL
1000 column=test1:name, timestamp=1475269965992, value=MapR
1001 column=test1:group, timestamp=1475269973068, value=Hado
op
2 row(s) in 0.0520 seconds

 

Step 5) Set ACE(Access Control Expressions) to each column

[mapr@vn1 logs]$ maprcli table cf colperm set -path /user/ace1 -cfname test1 -name group -readperm 'u:juser'
[mapr@vn1 logs]$ maprcli table cf colperm set -path /user/ace1 -cfname test1 -name name -readperm 'u:mapr'

 

Result 1) Login as 'mapr' user

[mapr@vn1 logs]$ hbase shell
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 1.1.1-mapr-1602, rb861ca48ca25c69cf7f02b64b7a3d5c92dc310c5, Mon Feb 22 20:52:10 UTC 2016
Not all HBase shell commands are applicable to MapR tables.
Consult MapR documentation for the list of supported commands.
hbase(main):001:0> scan '/user/ace1'
ROW COLUMN+CELL
1000 column=test1:name, timestamp=1475269965992, value=MapR
1 row(s) in 0.0880 seconds

 

Result 2) Login as 'juser' user

[juser@vn1 ~]$ hbase shell
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 1.1.1-mapr-1602, rb861ca48ca25c69cf7f02b64b7a3d5c92dc310c5, Mon Feb 22 20:52:10 UTC 2016
Not all HBase shell commands are applicable to MapR tables.
Consult MapR documentation for the list of supported commands.
hbase(main):001:0> scan '/user/ace1'
ROW COLUMN+CELL
1001 column=test1:group, timestamp=1475269973068, value=Hado
op
1 row(s) in 0.0910 seconds

 

Environment :

mapr-hadoop-core-2.7.0.37549.GA-1.x86_64
mapr-hbase-regionserver-1.1.1.201602221251-1.noarch
mapr-core-5.1.0.37549.GA-1.x86_64
mapr-resourcemanager-2.7.0.37549.GA-1.x86_64
mapr-cldb-5.1.0.37549.GA-1.x86_64
mapr-mapreduce2-2.7.0.37549.GA-1.x86_64
mapr-hbasethrift-1.1.1.201602221251-1.noarch
mapr-zookeeper-5.1.0.37549.GA-1.x86_64
mapr-hbase-1.1.1.201602221251-1.noarch
mapr-mapreduce1-0.20.2.37549.GA-1.x86_64
mapr-hbase-master-1.1.1.201602221251-1.noarch
mapr-zk-internal-5.1.0.37549.GA-1.x86_64
mapr-patch-5.1.0.37549.GA-39127.x86_64
mapr-nodemanager-2.7.0.37549.GA-1.x86_64
mapr-core-internal-5.1.0.37549.GA-1.x86_64
mapr-hive-1.2.201604040723-1.noarch
4 people found this helpful

Attachments

    Outcomes