2、删除内部主题:报错, 3、删除不存在的主题:--if-exists [root@slave1 kafka_2.11-2.2.0]# bin/kafka-topics.sh --zookeeper localhost:2181/kafka --delete --topic test-config Error while executing topic command : Topics in [] does not exist [2019-05-08 10:19:24,526] ERROR java.lang.Ill...
在创建主题时有一个 if-not-exists 参数来忽略一些异常,在这里也有对应的参数,如果所要修改的主题不存在,可以通过 if-exists 参数来忽略异常。下面修改一个不存在的主题 topic-unknown 的分区,会报出错误信息“Topic topic-unknown does not exist”,示例如下: 除了修改分区数,我们还可以使用 kafka-topics.sh 脚本...
在创建主题时有一个if-not-exists参数来忽略一些异常,在这里也有对应的参数,如果所要修改的主题不存在,可以通过if-exists参数来忽略异常。下面修改一个不存在的主题 topic-unknown的分区,会报出错误信息“Topic topic-unknown does not exist”,示例如下: 除了修改分区数,我们还可以使用 kafka-topics.sh脚本的ater指...
offsetMap.put(topicAndPartition,offset)}catch{casez:ZkNoNodeException=>if(ZkUtils.pathExists(zkClient,topicDirs.consumerOffsetDir))offsetMap.put(topicAndPartition,-1)elsethrowz}}elseif(offsetAndMetadata.error==ErrorMapping.NoError)offsetMap.put(topicAndPartition,offsetAndMetadata.offset)else{println("...
val ifExists = opts.options.has(opts.ifExistsOpt) // topic不存在 直接抛出异常 if (topics.isEmpty && !ifExists) { throw new IllegalArgumentException("Topic %s does not exist on ZK path %s".format(opts.options.valueOf(opts.topicOpt), ...
if the topic exists --if-not-exists if set when creating topics, the action will only execute if the topic does not already exist --list List all available topics. --partitions <Integer: # of partitions> The number of partitions for the topic ...
*/ rkm->rkm_err = err; rd_kafka_interceptors_on_acknowledgement(rkt->rkt_rk, &rkm->rkm_rkmessage); /* Handle partitioner failures: it only fails when the application * attempts to force a destination partition that does not exist * in the cluster. Note we must clear the RD_KAFKA_MSG...
--if-not-exists if set when creating topics, the action will only execute if the topic does not already exist. --list List all available topics. --partitions <Integer: # of partitions> The number of partitions for the topic being created or altered (WARNING: If partitions are increased fo...
execute if the topic exists --if-not-existsifset when creating topics, the action will only execute if the topic does not already exist --list List all available topics. --partitions <Integer: # of partitions> The number of partitions for the...
No tag containing this key exists. 不存在包含该键的标签。 请检查标签 404 DMS.10540401 The queue name does not exist. 队列名不存在。 请检查队列名是否存在 405 DMS.00405001 This request method is not allowed. 请求中指定的方法不被允许。