public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, user_); } { int dataSize = 0; for (int i = 0; i < auth_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeUInt32SizeNoTag(auth_.get(i)); } size += dataSize; size += 1 * getAuthList().size(); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
public void refreshUserAuthsCache(byte[] data) throws IOException { MultiUserAuthorizations multiUserAuths = null; try { multiUserAuths = VisibilityUtils.readUserAuthsFromZKData(data); } catch (DeserializationException dse) { throw new IOException(dse); } this.lock.writeLock().lock(); try { this.userAuths.clear(); this.groupAuths.clear(); for (UserAuthorizations userAuths : multiUserAuths.getUserAuthsList()) { String user = Bytes.toString(userAuths.getUser().toByteArray()); if (AuthUtil.isGroupPrincipal(user)) { this.groupAuths.put(AuthUtil.getGroupName(user), new HashSet<>(userAuths.getAuthList())); } else { this.userAuths.put(user, new HashSet<>(userAuths.getAuthList())); } } } finally { this.lock.writeLock().unlock(); } }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasUser()) { hash = (37 * hash) + USER_FIELD_NUMBER; hash = (53 * hash) + getUser().hashCode(); } if (getAuthCount() > 0) { hash = (37 * hash) + AUTH_FIELD_NUMBER; hash = (53 * hash) + getAuthList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
public void refreshUserAuthsCache(byte[] data) throws IOException { MultiUserAuthorizations multiUserAuths = null; try { multiUserAuths = VisibilityUtils.readUserAuthsFromZKData(data); } catch (DeserializationException dse) { throw new IOException(dse); } this.lock.writeLock().lock(); try { this.userAuths.clear(); this.groupAuths.clear(); for (UserAuthorizations userAuths : multiUserAuths.getUserAuthsList()) { String user = Bytes.toString(userAuths.getUser().toByteArray()); if (AuthUtil.isGroupPrincipal(user)) { this.groupAuths.put(AuthUtil.getGroupName(user), new HashSet<Integer>(userAuths.getAuthList())); } else { this.userAuths.put(user, new HashSet<Integer>(userAuths.getAuthList())); } } } finally { this.lock.writeLock().unlock(); } }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.UserAuthorizations)) { return super.equals(obj); } org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.UserAuthorizations other = (org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.UserAuthorizations) obj; boolean result = true; result = result && (hasUser() == other.hasUser()); if (hasUser()) { result = result && getUser() .equals(other.getUser()); } result = result && getAuthList() .equals(other.getAuthList()); result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.UserAuthorizations)) { return super.equals(obj); } org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.UserAuthorizations other = (org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.UserAuthorizations) obj; boolean result = true; result = result && (hasUser() == other.hasUser()); if (hasUser()) { result = result && getUser() .equals(other.getUser()); } result = result && getAuthList() .equals(other.getAuthList()); result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, user_); } { int dataSize = 0; for (int i = 0; i < auth_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeUInt32SizeNoTag(auth_.get(i)); } size += dataSize; size += 1 * getAuthList().size(); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.facebook.presto.hbase.$internal.com.google.protobuf.CodedOutputStream .computeBytesSize(1, user_); } { int dataSize = 0; for (int i = 0; i < auth_.size(); i++) { dataSize += com.facebook.presto.hbase.$internal.com.google.protobuf.CodedOutputStream .computeUInt32SizeNoTag(auth_.get(i)); } size += dataSize; size += 1 * getAuthList().size(); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, user_); } { int dataSize = 0; for (int i = 0; i < auth_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeUInt32SizeNoTag(auth_.get(i)); } size += dataSize; size += 1 * getAuthList().size(); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasUser()) { hash = (37 * hash) + USER_FIELD_NUMBER; hash = (53 * hash) + getUser().hashCode(); } if (getAuthCount() > 0) { hash = (37 * hash) + AUTH_FIELD_NUMBER; hash = (53 * hash) + getAuthList().hashCode(); } 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 (hasUser()) { hash = (37 * hash) + USER_FIELD_NUMBER; hash = (53 * hash) + getUser().hashCode(); } if (getAuthCount() > 0) { hash = (37 * hash) + AUTH_FIELD_NUMBER; hash = (53 * hash) + getAuthList().hashCode(); } 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 (hasUser()) { hash = (37 * hash) + USER_FIELD_NUMBER; hash = (53 * hash) + getUser().hashCode(); } if (getAuthCount() > 0) { hash = (37 * hash) + AUTH_FIELD_NUMBER; hash = (53 * hash) + getAuthList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.UserAuthorizations)) { return super.equals(obj); } org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.UserAuthorizations other = (org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.UserAuthorizations) obj; boolean result = true; result = result && (hasUser() == other.hasUser()); if (hasUser()) { result = result && getUser() .equals(other.getUser()); } result = result && getAuthList() .equals(other.getAuthList()); result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.UserAuthorizations)) { return super.equals(obj); } org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.UserAuthorizations other = (org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.UserAuthorizations) obj; boolean result = true; result = result && (hasUser() == other.hasUser()); if (hasUser()) { result = result && getUser() .equals(other.getUser()); } result = result && getAuthList() .equals(other.getAuthList()); result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }