You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2018/11/07 15:10:21 UTC
[GitHub] jiazhai commented on issue #2430: Namespaces admin commands should
be able to distinguish v1 and v2 namespace format
jiazhai commented on issue #2430: Namespaces admin commands should be able to distinguish v1 and v2 namespace format
URL: https://github.com/apache/pulsar/issues/2430#issuecomment-436655502
@sijie Seems this is not able to produce. And the code that used in NamespacesImpl.java has already identified v1/v2 ns.
```
private WebTarget namespacePath(NamespaceName namespace, String... parts) {
final WebTarget base = namespace.isV2() ? adminV2Namespaces : adminNamespaces;
WebTarget namespacePath = base.path(namespace.toString());
namespacePath = WebTargets.addParts(namespacePath, parts);
return namespacePath;
}
```
I am using a standalone cluster, and set --limit 1k, and test could not produce more data when limit reached.
```
➜ apache-pulsar-2.3.0-SNAPSHOT git:(master) bin/pulsar-admin namespaces set-backlog-quota test-tenant/standalone/test-ns --limit 1k --policy producer_exception
➜ apache-pulsar-2.3.0-SNAPSHOT git:(master) bin/pulsar-admin namespaces get-backlog-quotas test-tenant/standalone/test-ns
{
"destination_storage" : {
"limit" : 1024,
"policy" : "producer_exception"
}
}
bin/pulsar-client produce persistent://test-tenant/standalone/test-ns/test-topic --messages "hello pulsar this is the content for each message" -n 1000
22:56:25.895 [pulsar-client-io-1-1] INFO org.apache.pulsar.client.impl.ConnectionPool - [[id: 0x83c525b7, L:/127.0.0.1:61599 - R:localhost/127.0.0.1:6650]] Connected to server
22:56:26.008 [pulsar-client-io-1-1] INFO org.apache.pulsar.client.impl.ProducerStatsRecorderImpl - Starting Pulsar producer perf with config: {
"topicName" : "persistent://test-tenant/standalone/test-ns/test-topic",
"producerName" : null,
"sendTimeoutMs" : 30000,
"blockIfQueueFull" : false,
"maxPendingMessages" : 1000,
"maxPendingMessagesAcrossPartitions" : 50000,
"messageRoutingMode" : "RoundRobinPartition",
"hashingScheme" : "JavaStringHash",
"cryptoFailureAction" : "FAIL",
"batchingMaxPublishDelayMicros" : 1000,
"batchingMaxMessages" : 1000,
"batchingEnabled" : true,
"compressionType" : "NONE",
"initialSequenceId" : null,
"properties" : { }
}
22:56:26.010 [pulsar-client-io-1-1] INFO org.apache.pulsar.client.impl.ProducerStatsRecorderImpl - Pulsar client config: {
"serviceUrl" : "pulsar://localhost:6650/",
"operationTimeoutMs" : 30000,
"statsIntervalSeconds" : 60,
"numIoThreads" : 1,
"numListenerThreads" : 1,
"connectionsPerBroker" : 1,
"useTcpNoDelay" : true,
"useTls" : false,
"tlsTrustCertsFilePath" : "",
"tlsAllowInsecureConnection" : false,
"tlsHostnameVerificationEnable" : false,
"concurrentLookupRequest" : 5000,
"maxLookupRequest" : 50000,
"maxNumberOfRejectedRequestPerConnection" : 50,
"keepAliveIntervalSeconds" : 30
}
22:56:26.027 [pulsar-client-io-1-1] INFO org.apache.pulsar.client.impl.ConnectionPool - [[id: 0x84a28f07, L:/127.0.0.1:61600 - R:localhost/127.0.0.1:6650]] Connected to server
22:56:26.027 [pulsar-client-io-1-1] INFO org.apache.pulsar.client.impl.ClientCnx - [id: 0x84a28f07, L:/127.0.0.1:61600 - R:localhost/127.0.0.1:6650] Connected through proxy to target broker at jiazhais-MacBook-Pro.local:6650
22:56:26.029 [pulsar-client-io-1-1] INFO org.apache.pulsar.client.impl.ProducerImpl - [persistent://test-tenant/standalone/test-ns/test-topic] [null] Creating producer on cnx [id: 0x84a28f07, L:/127.0.0.1:61600 - R:localhost/127.0.0.1:6650]
22:56:26.034 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ClientCnx - [id: 0x84a28f07, L:/127.0.0.1:61600 - R:localhost/127.0.0.1:6650] Received error from server: Cannot create producer on topic with backlog quota exceeded
22:56:26.035 [pulsar-client-io-1-1] ERROR org.apache.pulsar.client.impl.ProducerImpl - [persistent://test-tenant/standalone/test-ns/test-topic] [null] Failed to create producer: Cannot create producer on topic with backlog quota exceeded
22:56:26.035 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ProducerImpl - [persistent://test-tenant/standalone/test-ns/test-topic] [null] Topic backlog quota exceeded. Throwing Exception on producer.
22:56:26.036 [main] ERROR org.apache.pulsar.client.cli.PulsarClientTool - Error while producing messages
22:56:26.036 [main] ERROR org.apache.pulsar.client.cli.PulsarClientTool - Cannot create producer on topic with backlog quota exceeded
org.apache.pulsar.client.api.PulsarClientException$ProducerBlockedQuotaExceededException: Cannot create producer on topic with backlog quota exceeded
at org.apache.pulsar.client.impl.ClientCnx.getPulsarClientException(ClientCnx.java:815) ~[org.apache.pulsar-pulsar-client-original-2.3.0-SNAPSHOT.jar:2.3.0-SNAPSHOT]
at org.apache.pulsar.client.impl.ClientCnx.handleError(ClientCnx.java:515) ~[org.apache.pulsar-pulsar-client-original-2.3.0-SNAPSHOT.jar:2.3.0-SNAPSHOT]
at org.apache.pulsar.common.api.PulsarDecoder.channelRead(PulsarDecoder.java:157) ~[org.apache.pulsar-pulsar-common-2.3.0-SNAPSHOT.jar:2.3.0-SNAPSHOT]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[io.netty-netty-all-4.1.22.Final.jar:4.1.22.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[io.netty-netty-all-4.1.22.Final.jar:4.1.22.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[io.netty-netty-all-4.1.22.Final.jar:4.1.22.Final]
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310) ~[io.netty-netty-all-4.1.22.Final.jar:4.1.22.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284) ~[io.netty-netty-all-4.1.22.Final.jar:4.1.22.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[io.netty-netty-all-4.1.22.Final.jar:4.1.22.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[io.netty-netty-all-4.1.22.Final.jar:4.1.22.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[io.netty-netty-all-4.1.22.Final.jar:4.1.22.Final]
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1414) ~[io.netty-netty-all-4.1.22.Final.jar:4.1.22.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[io.netty-netty-all-4.1.22.Final.jar:4.1.22.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[io.netty-netty-all-4.1.22.Final.jar:4.1.22.Final]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:945) ~[io.netty-netty-all-4.1.22.Final.jar:4.1.22.Final]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:146) ~[io.netty-netty-all-4.1.22.Final.jar:4.1.22.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645) ~[io.netty-netty-all-4.1.22.Final.jar:4.1.22.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580) ~[io.netty-netty-all-4.1.22.Final.jar:4.1.22.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497) ~[io.netty-netty-all-4.1.22.Final.jar:4.1.22.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459) ~[io.netty-netty-all-4.1.22.Final.jar:4.1.22.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886) ~[io.netty-netty-all-4.1.22.Final.jar:4.1.22.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[io.netty-netty-all-4.1.22.Final.jar:4.1.22.Final]
at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_131]
22:56:26.040 [main] INFO org.apache.pulsar.client.cli.PulsarClientTool - 0 messages successfully produced
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services