@Override protected void handleLookup(CommandLookupTopic lookup) { final long requestId = lookup.getRequestId(); final boolean authoritative = lookup.getAuthoritative(); if (log.isDebugEnabled()) { log.debug("[{}] Received Lookup from {} for {}", lookup.getTopic(), remoteAddress, requestId); TopicName topicName = validateTopicName(lookup.getTopic(), requestId, lookup); if (topicName == null) { return;
partitionMetadataResponse_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandPartitionedTopicMetadataResponse.getDefaultInstance(); bitField0_ = (bitField0_ & ~0x00200000); lookupTopic_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandLookupTopic.getDefaultInstance(); bitField0_ = (bitField0_ & ~0x00400000); lookupTopicResponse_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandLookupTopicResponse.getDefaultInstance();
partitionMetadata_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandPartitionedTopicMetadata.getDefaultInstance(); partitionMetadataResponse_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandPartitionedTopicMetadataResponse.getDefaultInstance(); lookupTopic_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandLookupTopic.getDefaultInstance(); lookupTopicResponse_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandLookupTopicResponse.getDefaultInstance(); consumerStats_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandConsumerStats.getDefaultInstance();
log.debug("Received Lookup from {}", clientAddress); long clientRequestId = lookup.getRequestId(); if (this.service.getLookupRequestSemaphore().tryAcquire()) { lookupRequests.inc(); String topic = lookup.getTopic(); String serviceUrl; if (isBlank(brokerServiceURL)) {
if (((bitField0_ & 0x00000001) == 0x00000001)) { size += org.apache.pulsar.shaded.com.google.protobuf.v241.CodedOutputStream .computeBytesSize(1, getTopicBytes()); .computeBytesSize(4, getOriginalPrincipalBytes()); .computeBytesSize(5, getOriginalAuthDataBytes()); .computeBytesSize(6, getOriginalAuthMethodBytes());
public void writeTo(org.apache.pulsar.common.util.protobuf.ByteBufCodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getTopicBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeUInt64(2, requestId_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBool(3, authoritative_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBytes(4, getOriginalPrincipalBytes()); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeBytes(5, getOriginalAuthDataBytes()); } if (((bitField0_ & 0x00000020) == 0x00000020)) { output.writeBytes(6, getOriginalAuthMethodBytes()); } }
public Builder mergeFrom(org.apache.pulsar.common.api.proto.PulsarApi.CommandLookupTopic other) { if (other == org.apache.pulsar.common.api.proto.PulsarApi.CommandLookupTopic.getDefaultInstance()) return this; if (other.hasTopic()) { setTopic(other.getTopic()); } if (other.hasRequestId()) { setRequestId(other.getRequestId()); } if (other.hasAuthoritative()) { setAuthoritative(other.getAuthoritative()); } if (other.hasOriginalPrincipal()) { setOriginalPrincipal(other.getOriginalPrincipal()); } if (other.hasOriginalAuthData()) { setOriginalAuthData(other.getOriginalAuthData()); } if (other.hasOriginalAuthMethod()) { setOriginalAuthMethod(other.getOriginalAuthMethod()); } return this; }
public org.apache.pulsar.common.api.proto.PulsarApi.CommandLookupTopic getDefaultInstanceForType() { return org.apache.pulsar.common.api.proto.PulsarApi.CommandLookupTopic.getDefaultInstance(); }
public Builder mergeLookupTopic(org.apache.pulsar.common.api.proto.PulsarApi.CommandLookupTopic value) { if (((bitField0_ & 0x00400000) == 0x00400000) && lookupTopic_ != org.apache.pulsar.common.api.proto.PulsarApi.CommandLookupTopic.getDefaultInstance()) { lookupTopic_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandLookupTopic.newBuilder(lookupTopic_).mergeFrom(value).buildPartial(); } else { lookupTopic_ = value; } bitField0_ |= 0x00400000; return this; } public Builder clearLookupTopic() {
public Builder clearOriginalPrincipal() { bitField0_ = (bitField0_ & ~0x00000008); originalPrincipal_ = getDefaultInstance().getOriginalPrincipal(); return this; } void setOriginalPrincipal(org.apache.pulsar.shaded.com.google.protobuf.v241.ByteString value) {
public Builder clearOriginalAuthData() { bitField0_ = (bitField0_ & ~0x00000010); originalAuthData_ = getDefaultInstance().getOriginalAuthData(); return this; } void setOriginalAuthData(org.apache.pulsar.shaded.com.google.protobuf.v241.ByteString value) {
public Builder clearTopic() { bitField0_ = (bitField0_ & ~0x00000001); topic_ = getDefaultInstance().getTopic(); return this; } void setTopic(org.apache.pulsar.shaded.com.google.protobuf.v241.ByteString value) {
/** * handles discovery request from client ands sends next active broker address */ @Override protected void handleLookup(CommandLookupTopic lookup) { checkArgument(state == State.Connected); if (LOG.isDebugEnabled()) { LOG.debug("Received Lookup from {}", remoteAddress); } sendLookupResponse(lookup.getRequestId()); }
public Builder clearLookupTopic() { lookupTopic_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandLookupTopic.getDefaultInstance(); bitField0_ = (bitField0_ & ~0x00400000); return this; }
public Builder clearOriginalAuthMethod() { bitField0_ = (bitField0_ & ~0x00000020); originalAuthMethod_ = getDefaultInstance().getOriginalAuthMethod(); return this; } void setOriginalAuthMethod(org.apache.pulsar.shaded.com.google.protobuf.v241.ByteString value) {
partitionMetadataResponse_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandPartitionedTopicMetadataResponse.getDefaultInstance(); bitField0_ = (bitField0_ & ~0x00200000); lookupTopic_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandLookupTopic.getDefaultInstance(); bitField0_ = (bitField0_ & ~0x00400000); lookupTopicResponse_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandLookupTopicResponse.getDefaultInstance();
partitionMetadata_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandPartitionedTopicMetadata.getDefaultInstance(); partitionMetadataResponse_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandPartitionedTopicMetadataResponse.getDefaultInstance(); lookupTopic_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandLookupTopic.getDefaultInstance(); lookupTopicResponse_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandLookupTopicResponse.getDefaultInstance(); consumerStats_ = org.apache.pulsar.common.api.proto.PulsarApi.CommandConsumerStats.getDefaultInstance();
if (((bitField0_ & 0x00000001) == 0x00000001)) { size += org.apache.pulsar.shaded.com.google.protobuf.v241.CodedOutputStream .computeBytesSize(1, getTopicBytes()); .computeBytesSize(4, getOriginalPrincipalBytes()); .computeBytesSize(5, getOriginalAuthDataBytes()); .computeBytesSize(6, getOriginalAuthMethodBytes());
public void writeTo(org.apache.pulsar.common.util.protobuf.ByteBufCodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getTopicBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeUInt64(2, requestId_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBool(3, authoritative_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBytes(4, getOriginalPrincipalBytes()); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeBytes(5, getOriginalAuthDataBytes()); } if (((bitField0_ & 0x00000020) == 0x00000020)) { output.writeBytes(6, getOriginalAuthMethodBytes()); } }
public Builder mergeFrom(org.apache.pulsar.common.api.proto.PulsarApi.CommandLookupTopic other) { if (other == org.apache.pulsar.common.api.proto.PulsarApi.CommandLookupTopic.getDefaultInstance()) return this; if (other.hasTopic()) { setTopic(other.getTopic()); } if (other.hasRequestId()) { setRequestId(other.getRequestId()); } if (other.hasAuthoritative()) { setAuthoritative(other.getAuthoritative()); } if (other.hasOriginalPrincipal()) { setOriginalPrincipal(other.getOriginalPrincipal()); } if (other.hasOriginalAuthData()) { setOriginalAuthData(other.getOriginalAuthData()); } if (other.hasOriginalAuthMethod()) { setOriginalAuthMethod(other.getOriginalAuthMethod()); } return this; }