@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasClassName()) { hash = (37 * hash) + CLASS_NAME_FIELD_NUMBER; hash = (53 * hash) + getClassName().hashCode(); } if (hasUserPayload()) { hash = (37 * hash) + USER_PAYLOAD_FIELD_NUMBER; hash = (53 * hash) + getUserPayload().hashCode(); } if (hasHistoryText()) { hash = (37 * hash) + HISTORY_TEXT_FIELD_NUMBER; hash = (53 * hash) + getHistoryText().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.hive.llap.daemon.rpc.LlapDaemonProtocolProtos.EntityDescriptorProto)) { return super.equals(obj); } org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos.EntityDescriptorProto other = (org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos.EntityDescriptorProto) obj; boolean result = true; result = result && (hasClassName() == other.hasClassName()); if (hasClassName()) { result = result && getClassName() .equals(other.getClassName()); } result = result && (hasUserPayload() == other.hasUserPayload()); if (hasUserPayload()) { result = result && getUserPayload() .equals(other.getUserPayload()); } result = result && (hasHistoryText() == other.hasHistoryText()); if (hasHistoryText()) { result = result && getHistoryText() .equals(other.getHistoryText()); } result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
public Builder mergeFrom(org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos.EntityDescriptorProto other) { if (other == org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos.EntityDescriptorProto.getDefaultInstance()) return this; if (other.hasClassName()) { bitField0_ |= 0x00000001; className_ = other.className_; onChanged(); } if (other.hasUserPayload()) { mergeUserPayload(other.getUserPayload()); } if (other.hasHistoryText()) { setHistoryText(other.getHistoryText()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
private static UserPayload convertPayloadFromProto( EntityDescriptorProto proto) { UserPayload userPayload = null; if (proto.hasUserPayload()) { if (proto.getUserPayload().hasUserPayload()) { userPayload = UserPayload.create(proto.getUserPayload().getUserPayload().asReadOnlyByteBuffer(), proto.getUserPayload().getVersion()); } else { userPayload = UserPayload.create(null); } } return userPayload; }