StringBuilder builder = new StringBuilder(); builder.append("TYPE => THROTTLE"); if (proto.hasType()) { builder.append(", THROTTLE_TYPE => "); builder.append(proto.getType().toString());
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasType()) { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + type_; } if (hasTimedQuota()) { hash = (37 * hash) + TIMED_QUOTA_FIELD_NUMBER; hash = (53 * hash) + getTimedQuota().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
if (!otherThrottle.proto.hasType() || !otherThrottle.proto.hasTimedQuota()) {
StringBuilder builder = new StringBuilder(); builder.append("TYPE => THROTTLE"); if (proto.hasType()) { builder.append(", THROTTLE_TYPE => "); builder.append(proto.getType().toString());
@Override protected ThrottleSettings merge(QuotaSettings other) throws IOException { if (other instanceof ThrottleSettings) { ThrottleSettings otherThrottle = (ThrottleSettings) other; // Make sure this and the other target the same "subject" validateQuotaTarget(other); QuotaProtos.ThrottleRequest.Builder builder = proto.toBuilder(); if (!otherThrottle.proto.hasType()) { return null; } QuotaProtos.ThrottleRequest otherProto = otherThrottle.proto; if (otherProto.hasTimedQuota()) { if (otherProto.hasTimedQuota()) { validateTimedQuota(otherProto.getTimedQuota()); } if (!proto.getType().equals(otherProto.getType())) { throw new IllegalArgumentException( "Cannot merge a ThrottleRequest for " + proto.getType() + " with " + otherProto.getType()); } QuotaProtos.TimedQuota.Builder timedQuotaBuilder = proto.getTimedQuota().toBuilder(); timedQuotaBuilder.mergeFrom(otherProto.getTimedQuota()); QuotaProtos.ThrottleRequest mergedReq = builder.setTimedQuota( timedQuotaBuilder.build()).build(); return new ThrottleSettings(getUserName(), getTableName(), getNamespace(), mergedReq); } } return this; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.ThrottleRequest)) { return super.equals(obj); } org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.ThrottleRequest other = (org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.ThrottleRequest) obj; boolean result = true; result = result && (hasType() == other.hasType()); if (hasType()) { result = result && type_ == other.type_; } result = result && (hasTimedQuota() == other.hasTimedQuota()); if (hasTimedQuota()) { result = result && getTimedQuota() .equals(other.getTimedQuota()); } result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasType()) { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + type_; } if (hasTimedQuota()) { hash = (37 * hash) + TIMED_QUOTA_FIELD_NUMBER; hash = (53 * hash) + getTimedQuota().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public Builder mergeFrom(org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.ThrottleRequest other) { if (other == org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.ThrottleRequest.getDefaultInstance()) return this; if (other.hasType()) { setType(other.getType()); } if (other.hasTimedQuota()) { mergeTimedQuota(other.getTimedQuota()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
StringBuilder builder = new StringBuilder(); builder.append("TYPE => THROTTLE"); if (proto.hasType()) { builder.append(", THROTTLE_TYPE => "); builder.append(proto.getType().toString());
@Override protected ThrottleSettings merge(QuotaSettings other) throws IOException { if (other instanceof ThrottleSettings) { ThrottleSettings otherThrottle = (ThrottleSettings) other; // Make sure this and the other target the same "subject" validateQuotaTarget(other); QuotaProtos.ThrottleRequest.Builder builder = proto.toBuilder(); if (!otherThrottle.proto.hasType()) { return null; } QuotaProtos.ThrottleRequest otherProto = otherThrottle.proto; if (otherProto.hasTimedQuota()) { if (otherProto.hasTimedQuota()) { validateTimedQuota(otherProto.getTimedQuota()); } if (!proto.getType().equals(otherProto.getType())) { throw new IllegalArgumentException( "Cannot merge a ThrottleRequest for " + proto.getType() + " with " + otherProto.getType()); } QuotaProtos.TimedQuota.Builder timedQuotaBuilder = proto.getTimedQuota().toBuilder(); timedQuotaBuilder.mergeFrom(otherProto.getTimedQuota()); QuotaProtos.ThrottleRequest mergedReq = builder.setTimedQuota( timedQuotaBuilder.build()).build(); return new ThrottleSettings(getUserName(), getTableName(), getNamespace(), mergedReq); } } return this; }
@Override protected ThrottleSettings merge(QuotaSettings other) throws IOException { if (other instanceof ThrottleSettings) { ThrottleSettings otherThrottle = (ThrottleSettings) other; // Make sure this and the other target the same "subject" validateQuotaTarget(other); QuotaProtos.ThrottleRequest.Builder builder = proto.toBuilder(); if (!otherThrottle.proto.hasType()) { return null; } QuotaProtos.ThrottleRequest otherProto = otherThrottle.proto; if (otherProto.hasTimedQuota()) { if (otherProto.hasTimedQuota()) { validateTimedQuota(otherProto.getTimedQuota()); } if (!proto.getType().equals(otherProto.getType())) { throw new IllegalArgumentException( "Cannot merge a ThrottleRequest for " + proto.getType() + " with " + otherProto.getType()); } QuotaProtos.TimedQuota.Builder timedQuotaBuilder = proto.getTimedQuota().toBuilder(); timedQuotaBuilder.mergeFrom(otherProto.getTimedQuota()); QuotaProtos.ThrottleRequest mergedReq = builder.setTimedQuota( timedQuotaBuilder.build()).build(); return new ThrottleSettings(getUserName(), getTableName(), getNamespace(), getRegionServer(), mergedReq); } } return this; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.ThrottleRequest)) { return super.equals(obj); } org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.ThrottleRequest other = (org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.ThrottleRequest) obj; boolean result = true; result = result && (hasType() == other.hasType()); if (hasType()) { result = result && type_ == other.type_; } result = result && (hasTimedQuota() == other.hasTimedQuota()); if (hasTimedQuota()) { result = result && getTimedQuota() .equals(other.getTimedQuota()); } result = result && unknownFields.equals(other.unknownFields); return result; }
public Builder mergeFrom(org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.ThrottleRequest other) { if (other == org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.ThrottleRequest.getDefaultInstance()) return this; if (other.hasType()) { setType(other.getType()); } if (other.hasTimedQuota()) { mergeTimedQuota(other.getTimedQuota()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }