AnsweredAssumed Answered

Enabling Table Authorizations with Access Control Expressions in Java HBase API

Question asked by masaharo on Jan 8, 2016
Latest reply on Mar 22, 2017 by nirav
Is it possible to define ACE:s with the Java HBase API?
My Java code is creating the tables and column families using this API, particularly the HBaseAdmin, HTableDescriptor and HColumnDescriptor classes. Both of the latter ones have functions setValue(String, String) and setConfiguration(String, String). Could I use these to set values for ACE control?

Now I can do this manually as in page:

This would lead to lots of manual work after automatic table creation, for example for single example table:

    maprcli table cf edit -path /tables/CP_DATA -cfname A -readperm 'p'
    maprcli table cf colperm set -path /tables/CP_DATA -cfname A -name column1 -readperm 'p'
    maprcli table cf colperm set -path /tables/CP_DATA -cfname A -name column2 -readperm 'p'
    maprcli table cf colperm set -path /tables/CP_DATA -cfname A -name column3 -readperm 'p'
    ... for all columns ...   

These maprcli commands would set the read permission to public for this one table.

Now there is a rest interface for these operations, but is there a support for setting these values in the Java API as well? This would be a whole a lot more convenient :-)
If not, I will drop the Java API usage on table creation and turn into using the rest API instead.