Examples of UserPermission


Examples of org.apache.hadoop.hbase.security.access.UserPermission

    // Grant TABLE ADMIN privs on test table to UserA
    HTable acl = new HTable(conf, AccessControlLists.ACL_TABLE_NAME);
    try {
      AccessControllerProtocol protocol = acl.coprocessorProxy(
          AccessControllerProtocol.class, TEST_TABLE);
      protocol.grant(new UserPermission(Bytes.toBytes(TABLE_ADMIN.getShortName()),
        TEST_TABLE, null, Permission.Action.ADMIN));
    } finally {
      acl.close();
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.security.access.UserPermission

    // Grant TABLE ADMIN privs
    HTable acl = new HTable(conf, AccessControlLists.ACL_TABLE_NAME);
    try {
      AccessControllerProtocol protocol = acl.coprocessorProxy(
          AccessControllerProtocol.class, tableName);
      protocol.grant(new UserPermission(Bytes.toBytes(tableAdmin.getShortName()),
        tableName, null, Permission.Action.ADMIN));
    } finally {
      acl.close();
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.security.access.UserPermission

   *
   * @param proto the protobuf UserPermission
   * @return the converted UserPermission
   */
  public static UserPermission toUserPermission(AccessControlProtos.UserPermission proto) {
    return new UserPermission(proto.getUser().toByteArray(),
        toTablePermission(proto.getPermission()));
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.security.access.UserPermission

   *
   * @param proto the protobuf UserPermission
   * @return the converted UserPermission
   */
  public static UserPermission toUserPermission(AccessControlProtos.UserPermission proto) {
    return new UserPermission(proto.getUser().toByteArray(),
        toTablePermission(proto.getPermission()));
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.security.access.UserPermission

   *
   * @param proto the protobuf UserPermission
   * @return the converted UserPermission
   */
  public static UserPermission toUserPermission(AccessControlProtos.UserPermission proto) {
    return new UserPermission(proto.getUser().toByteArray(),
        toTablePermission(proto.getPermission()));
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.security.access.UserPermission

   *
   * @param proto the protobuf UserPermission
   * @return the converted UserPermission
   */
  public static UserPermission toUserPermission(AccessControlProtos.UserPermission proto) {
    return new UserPermission(proto.getUser().toByteArray(),
        toTablePermission(proto.getPermission()));
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.security.access.UserPermission

   *
   * @param proto the protobuf UserPermission
   * @return the converted UserPermission
   */
  public static UserPermission toUserPermission(AccessControlProtos.UserPermission proto) {
    return new UserPermission(proto.getUser().toByteArray(),
        toTablePermission(proto.getPermission()));
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.security.access.UserPermission

   *
   * @param proto the protobuf UserPermission
   * @return the converted UserPermission
   */
  public static UserPermission toUserPermission(AccessControlProtos.UserPermission proto) {
    return new UserPermission(proto.getUser().toByteArray(),
        toTablePermission(proto.getPermission()));
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.security.access.UserPermission

   *
   * @param proto the protobuf UserPermission
   * @return the converted UserPermission
   */
  public static UserPermission toUserPermission(AccessControlProtos.UserPermission proto) {
    return new UserPermission(proto.getUser().toByteArray(),
        toTablePermission(proto.getPermission()));
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.security.access.UserPermission

    if (permission.hasTable()) table = permission.getTable().toByteArray();
    if (permission.hasFamily()) family = permission.getFamily().toByteArray();
    if (permission.hasQualifier()) qualifier = permission.getQualifier().toByteArray();

    return new UserPermission(proto.getUser().toByteArray(),
        table, family, qualifier,
        actions.toArray(new Permission.Action[actions.size()]));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.