private void sendPartitionMetadataResponse(CommandPartitionedTopicMetadata partitionMetadata) { final long requestId = partitionMetadata.getRequestId(); TopicName topicName = TopicName.get(partitionMetadata.getTopic()); service.getDiscoveryProvider() .getPartitionedTopicMetadata(service, topicName, authRole, authenticationData) .thenAccept(metadata -> { if (LOG.isDebugEnabled()) { LOG.debug("[{}] Total number of partitions for topic {} is {}", authRole, topicName, metadata.partitions); } ctx.writeAndFlush(Commands.newPartitionMetadataResponse(metadata.partitions, requestId)); }).exceptionally(ex -> { LOG.warn("[{}] Failed to get partitioned metadata for topic {} {}", remoteAddress, topicName, ex.getMessage(), ex); ctx.writeAndFlush( Commands.newPartitionMetadataResponse(ServerError.ServiceNotReady, ex.getMessage(), requestId)); return null; }); }
private void handlePartitionMetadataResponse(CommandPartitionedTopicMetadata partitionMetadata, long clientRequestId) { TopicName topicName = TopicName.get(partitionMetadata.getTopic()); if (isBlank(brokerServiceURL)) { service.getDiscoveryProvider().getPartitionedTopicMetadata(service, topicName,
final long requestId = partitionMetadata.getRequestId(); if (log.isDebugEnabled()) { log.debug("[{}] Received PartitionMetadataLookup from {} for {}", partitionMetadata.getTopic(), remoteAddress, requestId); TopicName topicName = validateTopicName(partitionMetadata.getTopic(), requestId, partitionMetadata); if (topicName == null) { return;
public Builder mergeFrom(org.apache.pulsar.common.api.proto.PulsarApi.CommandPartitionedTopicMetadata other) { if (other == org.apache.pulsar.common.api.proto.PulsarApi.CommandPartitionedTopicMetadata.getDefaultInstance()) return this; if (other.hasTopic()) { setTopic(other.getTopic()); } if (other.hasRequestId()) { setRequestId(other.getRequestId()); } if (other.hasOriginalPrincipal()) { setOriginalPrincipal(other.getOriginalPrincipal()); } if (other.hasOriginalAuthData()) { setOriginalAuthData(other.getOriginalAuthData()); } if (other.hasOriginalAuthMethod()) { setOriginalAuthMethod(other.getOriginalAuthMethod()); } return this; }
public Builder clearTopic() { bitField0_ = (bitField0_ & ~0x00000001); topic_ = getDefaultInstance().getTopic(); return this; } void setTopic(org.apache.pulsar.shaded.com.google.protobuf.v241.ByteString value) {
public Builder mergeFrom(org.apache.pulsar.common.api.proto.PulsarApi.CommandPartitionedTopicMetadata other) { if (other == org.apache.pulsar.common.api.proto.PulsarApi.CommandPartitionedTopicMetadata.getDefaultInstance()) return this; if (other.hasTopic()) { setTopic(other.getTopic()); } if (other.hasRequestId()) { setRequestId(other.getRequestId()); } if (other.hasOriginalPrincipal()) { setOriginalPrincipal(other.getOriginalPrincipal()); } if (other.hasOriginalAuthData()) { setOriginalAuthData(other.getOriginalAuthData()); } if (other.hasOriginalAuthMethod()) { setOriginalAuthMethod(other.getOriginalAuthMethod()); } return this; }
public Builder clearTopic() { bitField0_ = (bitField0_ & ~0x00000001); topic_ = getDefaultInstance().getTopic(); return this; } void setTopic(org.apache.pulsar.shaded.com.google.protobuf.v241.ByteString value) {