/** * Converts a TablePermission proto to a client TablePermission object. * @param proto the protobuf TablePermission * @return the converted TablePermission */ public static TablePermission toTablePermission(AccessControlProtos.TablePermission proto) { List<Permission.Action> actions = toPermissionActions(proto.getActionList()); TableName table = null; byte[] qualifier = null; byte[] family = null; if (!proto.hasTableName()) { throw new IllegalStateException("TableName cannot be empty"); } table = ProtobufUtil.toTableName(proto.getTableName()); if (proto.hasFamily()) { family = proto.getFamily().toByteArray(); } if (proto.hasQualifier()) { qualifier = proto.getQualifier().toByteArray(); } return new TablePermission(table, family, qualifier, actions.toArray(new Permission.Action[actions.size()])); }
if (perm.hasFamily()) { family = perm.getFamily().toByteArray();
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasTableName()) { hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; hash = (53 * hash) + getTableName().hashCode(); } if (hasFamily()) { hash = (37 * hash) + FAMILY_FIELD_NUMBER; hash = (53 * hash) + getFamily().hashCode(); } if (hasQualifier()) { hash = (37 * hash) + QUALIFIER_FIELD_NUMBER; hash = (53 * hash) + getQualifier().hashCode(); } if (getActionCount() > 0) { hash = (37 * hash) + ACTION_FIELD_NUMBER; hash = (53 * hash) + hashEnumList(getActionList()); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
if (perm.hasFamily()) family = perm.getFamily().toByteArray(); if (perm.hasQualifier()) qualifier = perm.getQualifier().toByteArray();
if (perm.hasFamily()) family = perm.getFamily().toByteArray(); if (perm.hasQualifier()) qualifier = perm.getQualifier().toByteArray();
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasTableName()) { hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; hash = (53 * hash) + getTableName().hashCode(); } if (hasFamily()) { hash = (37 * hash) + FAMILY_FIELD_NUMBER; hash = (53 * hash) + getFamily().hashCode(); } if (hasQualifier()) { hash = (37 * hash) + QUALIFIER_FIELD_NUMBER; hash = (53 * hash) + getQualifier().hashCode(); } if (getActionCount() > 0) { hash = (37 * hash) + ACTION_FIELD_NUMBER; hash = (53 * hash) + hashEnumList(getActionList()); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasTableName()) { hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; hash = (53 * hash) + getTableName().hashCode(); } if (hasFamily()) { hash = (37 * hash) + FAMILY_FIELD_NUMBER; hash = (53 * hash) + getFamily().hashCode(); } if (hasQualifier()) { hash = (37 * hash) + QUALIFIER_FIELD_NUMBER; hash = (53 * hash) + getQualifier().hashCode(); } if (getActionCount() > 0) { hash = (37 * hash) + ACTION_FIELD_NUMBER; hash = (53 * hash) + hashEnumList(getActionList()); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasTableName()) { hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; hash = (53 * hash) + getTableName().hashCode(); } if (hasFamily()) { hash = (37 * hash) + FAMILY_FIELD_NUMBER; hash = (53 * hash) + getFamily().hashCode(); } if (hasQualifier()) { hash = (37 * hash) + QUALIFIER_FIELD_NUMBER; hash = (53 * hash) + getQualifier().hashCode(); } if (getActionCount() > 0) { hash = (37 * hash) + ACTION_FIELD_NUMBER; hash = (53 * hash) + hashEnumList(getActionList()); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.TablePermission other) { if (other == org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.TablePermission.getDefaultInstance()) return this; if (other.hasTableName()) { mergeTableName(other.getTableName()); } if (other.hasFamily()) { setFamily(other.getFamily()); } if (other.hasQualifier()) { setQualifier(other.getQualifier()); } if (!other.action_.isEmpty()) { if (action_.isEmpty()) { action_ = other.action_; bitField0_ = (bitField0_ & ~0x00000008); } else { ensureActionIsMutable(); action_.addAll(other.action_); } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.TablePermission other) { if (other == org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.TablePermission.getDefaultInstance()) return this; if (other.hasTableName()) { mergeTableName(other.getTableName()); } if (other.hasFamily()) { setFamily(other.getFamily()); } if (other.hasQualifier()) { setQualifier(other.getQualifier()); } if (!other.action_.isEmpty()) { if (action_.isEmpty()) { action_ = other.action_; bitField0_ = (bitField0_ & ~0x00000008); } else { ensureActionIsMutable(); action_.addAll(other.action_); } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.TablePermission other) { if (other == org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.TablePermission.getDefaultInstance()) return this; if (other.hasTableName()) { mergeTableName(other.getTableName()); } if (other.hasFamily()) { setFamily(other.getFamily()); } if (other.hasQualifier()) { setQualifier(other.getQualifier()); } if (!other.action_.isEmpty()) { if (action_.isEmpty()) { action_ = other.action_; bitField0_ = (bitField0_ & ~0x00000008); } else { ensureActionIsMutable(); action_.addAll(other.action_); } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
if (perm.hasFamily()) family = perm.getFamily().toByteArray(); if (perm.hasQualifier()) qualifier = perm.getQualifier().toByteArray();
public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.TablePermission other) { if (other == org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.TablePermission.getDefaultInstance()) return this; if (other.hasTableName()) { mergeTableName(other.getTableName()); } if (other.hasFamily()) { setFamily(other.getFamily()); } if (other.hasQualifier()) { setQualifier(other.getQualifier()); } if (!other.action_.isEmpty()) { if (action_.isEmpty()) { action_ = other.action_; bitField0_ = (bitField0_ & ~0x00000008); } else { ensureActionIsMutable(); action_.addAll(other.action_); } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }