Kafka Offset相关命令总结

                                      作者:尹正杰

版权声明:原创作品,谢绝转载!否则将追究法律责任。

一.查询topic的offset的范围

1>.查询某个topic的offset的最小值

[root@node101.yinzhengjie.org.cn ~]# kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list 10.1.2.114: -topic yinzhengjie --time -
yinzhengjie::            #很显然,第一列为topic名称,第二列为partition名称,第三列则是offset。为估计仔细的你应该已经发现了最小的offset为0,分区数为30个
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
[root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list 10.1.2.114: -topic yinzhengjie --time - | wc -l [root@node101.yinzhengjie.org.cn ~]#

[root@node101.yinzhengjie.org.cn ~]# kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list 10.1.2.114:9092 -topic yinzhengjie --time -2

[root@node101.yinzhengjie.org.cn ~]# kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list 10.1.2.114: -topic data.batch.ad --time -
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
[root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list 10.1.2.114: -topic data.batch.ad --time - |wc -l [root@node101.yinzhengjie.org.cn ~]#

[root@node101.yinzhengjie.org.cn ~]# kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list 10.1.2.114:9092 -topic data.batch.ad --time -2

2>.查询某个topic的offset的最大值

[root@node101.yinzhengjie.org.cn ~]# kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list 10.1.2.114: -topic yinzhengjie --time -
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
yinzhengjie::
[root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list 10.1.2.114: -topic yinzhengjie --time - | wc -l [root@node101.yinzhengjie.org.cn ~]#

[root@node101.yinzhengjie.org.cn ~]# kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list 10.1.2.114:9092 -topic yinzhengjie --time -1

[root@node101.yinzhengjie.org.cn ~]# kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list 10.1.2.114: -topic data.batch.ad --time -
data.batch.ad::        #很明显,以冒号为分割,第一列为topic名称,第二列为partition 编号,第三列为当前最大的便宜量位置!
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
data.batch.ad::
[root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list 10.1.2.114: -topic data.batch.ad --time - | wc -l [root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]#

[root@node101.yinzhengjie.org.cn ~]# kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list 10.1.2.114:9092 -topic data.batch.ad --time -1

 

二.查看consumer group列表,使用--list参数

  查看consumer group列表有新、旧两种命令,分别查看新版(信息保存在broker中)consumer列表和老版(信息保存在zookeeper中)consumer列表,因而需要区分指定bootstrap--server和zookeeper参数:(本片博客测试的kafka版本为0.10.2.1)

[root@node101.yinzhengjie.org.cn ~]# kafka-consumer-groups.sh --zookeeper 10.1.2.114: --list
Note: This will only show information about consumers that use ZooKeeper (not those using the Java consumer API).        #很显然,为这里使用的是kafka 0.10..1版本,我们是查询不到对应的信息的! [root@node101.yinzhengjie.org.cn ~]#

[root@node101.yinzhengjie.org.cn ~]# kafka-consumer-groups.sh --zookeeper 10.1.2.114:2181 --list                #老版本的consumer信息都保存在zookeeper中,很显然,0.10.2.1这个版本已经将consumer信息自己保存啦!

[root@node101.yinzhengjie.org.cn ~]# kafka-consumer-groups.sh --bootstrap-server 10.1.2.114: --list            #查看新版consumer列表,很显然,我们可以查询到对应的数据
Note: This will only show information about consumers that use the Java consumer API (non-ZooKeeper-based consumers). id-data.batch.ad
console-consumer-
id-data.batch.env
id-data.batch.er
id-data.batch.pl
console-consumer-
id-data.batch.op
[root@node101.yinzhengjie.org.cn ~]#

[root@node101.yinzhengjie.org.cn ~]# kafka-consumer-groups.sh --bootstrap-server 10.1.2.114:9092 --list            #查看新版consumer列表,很显然,我们可以查询到对应的数据

三.查看指定group.id 的消费者消费情况 (kafka-consumer-groups.sh)

[root@node101.yinzhengjie.org.cn ~]# kafka-consumer-groups.sh --new-consumer --bootstrap-server 10.1.2.114:  --group id-data.batch.ad --describe
Note: This will only show information about consumers that use the Java consumer API (non-ZooKeeper-based consumers). TOPIC PARTITION CURRENT-OFFSET LOG-END-OFFSET LAG CONSUMER-ID HOST CLIENT-ID
data.batch.ad consumer--53498a12-e62b-46c8-9c5c-ad97f807698d /10.1.2.112 consumer-
data.batch.ad consumer--53498a12-e62b-46c8-9c5c-ad97f807698d /10.1.2.112 consumer-
data.batch.ad consumer--53498a12-e62b-46c8-9c5c-ad97f807698d /10.1.2.112 consumer-
data.batch.ad consumer--53498a12-e62b-46c8-9c5c-ad97f807698d /10.1.2.112 consumer-
data.batch.ad consumer--53498a12-e62b-46c8-9c5c-ad97f807698d /10.1.2.112 consumer-
data.batch.ad consumer--53498a12-e62b-46c8-9c5c-ad97f807698d /10.1.2.112 consumer-
data.batch.ad consumer--53498a12-e62b-46c8-9c5c-ad97f807698d /10.1.2.112 consumer-
data.batch.ad consumer--53498a12-e62b-46c8-9c5c-ad97f807698d /10.1.2.112 consumer-
data.batch.ad consumer--53498a12-e62b-46c8-9c5c-ad97f807698d /10.1.2.112 consumer-
data.batch.ad consumer--53498a12-e62b-46c8-9c5c-ad97f807698d /10.1.2.112 consumer-
data.batch.ad consumer--53498a12-e62b-46c8-9c5c-ad97f807698d /10.1.2.112 consumer-
data.batch.ad consumer--53498a12-e62b-46c8-9c5c-ad97f807698d /10.1.2.112 consumer-
data.batch.ad consumer--53498a12-e62b-46c8-9c5c-ad97f807698d /10.1.2.112 consumer-
data.batch.ad consumer--53498a12-e62b-46c8-9c5c-ad97f807698d /10.1.2.112 consumer-
data.batch.ad consumer--53498a12-e62b-46c8-9c5c-ad97f807698d /10.1.2.112 consumer-
data.batch.ad consumer--53498a12-e62b-46c8-9c5c-ad97f807698d /10.1.2.112 consumer-
data.batch.ad consumer--53498a12-e62b-46c8-9c5c-ad97f807698d /10.1.2.112 consumer-
data.batch.ad consumer--53498a12-e62b-46c8-9c5c-ad97f807698d /10.1.2.112 consumer-
data.batch.ad consumer--53498a12-e62b-46c8-9c5c-ad97f807698d /10.1.2.112 consumer-
data.batch.ad consumer--53498a12-e62b-46c8-9c5c-ad97f807698d /10.1.2.112 consumer-
data.batch.ad consumer--53498a12-e62b-46c8-9c5c-ad97f807698d /10.1.2.112 consumer-
data.batch.ad consumer--53498a12-e62b-46c8-9c5c-ad97f807698d /10.1.2.112 consumer-
data.batch.ad consumer--53498a12-e62b-46c8-9c5c-ad97f807698d /10.1.2.112 consumer-
data.batch.ad consumer--53498a12-e62b-46c8-9c5c-ad97f807698d /10.1.2.112 consumer-
data.batch.ad consumer--53498a12-e62b-46c8-9c5c-ad97f807698d /10.1.2.112 consumer-
data.batch.ad consumer--53498a12-e62b-46c8-9c5c-ad97f807698d /10.1.2.112 consumer-
data.batch.ad consumer--53498a12-e62b-46c8-9c5c-ad97f807698d /10.1.2.112 consumer-
data.batch.ad consumer--53498a12-e62b-46c8-9c5c-ad97f807698d /10.1.2.112 consumer-
data.batch.ad consumer--53498a12-e62b-46c8-9c5c-ad97f807698d /10.1.2.112 consumer-
data.batch.ad consumer--53498a12-e62b-46c8-9c5c-ad97f807698d /10.1.2.112 consumer-
[root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# kafka-consumer-groups.sh --new-consumer --bootstrap-server 10.1.2.114: --group id-data.batch.ad --describe | grep ad | wc -l
Note: This will only show information about consumers that use the Java consumer API (non-ZooKeeper-based consumers). [root@node101.yinzhengjie.org.cn ~]# 简单对每列进行说明: TOPIC:
  消费者的topic名称  
PARTITION:
  分区数的名称   CURRENT-OFFSET:
  consumer group最后一次提交的offset LOG-END-OFFSET:
  最后提交的生产消息offset
LAG
  消费offset与生产offset之间的差值
CONSUMER-ID
  消费者的ID编号,我们知道消费者组里面可以有最少要有一个消费者,当然也可以有多个消费者。
HOST
  消费者的主机IP地址。
CLIENT-ID
  链接的ID编号。

[root@node101.yinzhengjie.org.cn ~]# kafka-consumer-groups.sh --new-consumer --bootstrap-server 10.1.2.114:9092 --group id-data.batch.ad --describe

四. 查询 __consumer_offsets topic 所有内容

1>.运行下面命令前先要在consumer.properties中设置exclude.internal.topics=false

[root@node101.yinzhengjie.org.cn ~]# cat /soft/kafka/config/consumer.properties
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# see kafka.consumer.ConsumerConfig for more details # Zookeeper connection string
# comma separated host:port pairs, each corresponding to a zk
# server. e.g. "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002"
zookeeper.connect=127.0.0.1: # timeout in ms for connecting to zookeeper
zookeeper.connection.timeout.ms= #consumer group id
group.id=test-consumer-group #consumer timeout
#consumer.timeout.ms= exclude.internal.topics=false
[root@node101.yinzhengjie.org.cn ~]#

[root@node101.yinzhengjie.org.cn ~]# cat /soft/kafka/config/consumer.properties

2>.0.11.0.0之前版本

[root@node101.yinzhengjie.org.cn ~]# kafka-console-consumer.sh --topic __consumer_offsets --bootstrap-server 10.1.2.114: --formatter "kafka.coordinator.GroupMetadataManager\$OffsetsMessageFormatter" --consumer.config /soft/kafka/config/consumer.properties --from-beginning
.......
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,96ef03f3-528a--9b56-7b98ea258ba4],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,96ef03f3-528a--9b56-7b98ea258ba4],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,96ef03f3-528a--9b56-7b98ea258ba4],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,96ef03f3-528a--9b56-7b98ea258ba4],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,96ef03f3-528a--9b56-7b98ea258ba4],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,96ef03f3-528a--9b56-7b98ea258ba4],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,96ef03f3-528a--9b56-7b98ea258ba4],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,96ef03f3-528a--9b56-7b98ea258ba4],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,96ef03f3-528a--9b56-7b98ea258ba4],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,96ef03f3-528a--9b56-7b98ea258ba4],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,96ef03f3-528a--9b56-7b98ea258ba4],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,96ef03f3-528a--9b56-7b98ea258ba4],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,96ef03f3-528a--9b56-7b98ea258ba4],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,96ef03f3-528a--9b56-7b98ea258ba4],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,96ef03f3-528a--9b56-7b98ea258ba4],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,96ef03f3-528a--9b56-7b98ea258ba4],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,96ef03f3-528a--9b56-7b98ea258ba4],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,96ef03f3-528a--9b56-7b98ea258ba4],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,96ef03f3-528a--9b56-7b98ea258ba4],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,96ef03f3-528a--9b56-7b98ea258ba4],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,96ef03f3-528a--9b56-7b98ea258ba4],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,96ef03f3-528a--9b56-7b98ea258ba4],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,96ef03f3-528a--9b56-7b98ea258ba4],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,96ef03f3-528a--9b56-7b98ea258ba4],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,b350dc94-868b-42a5-91f3-7fb59ca7ea93],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,b350dc94-868b-42a5-91f3-7fb59ca7ea93],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,b350dc94-868b-42a5-91f3-7fb59ca7ea93],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,b350dc94-868b-42a5-91f3-7fb59ca7ea93],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,b350dc94-868b-42a5-91f3-7fb59ca7ea93],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,b350dc94-868b-42a5-91f3-7fb59ca7ea93],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,b350dc94-868b-42a5-91f3-7fb59ca7ea93],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,b350dc94-868b-42a5-91f3-7fb59ca7ea93],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,b350dc94-868b-42a5-91f3-7fb59ca7ea93],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,b350dc94-868b-42a5-91f3-7fb59ca7ea93],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,b350dc94-868b-42a5-91f3-7fb59ca7ea93],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,b350dc94-868b-42a5-91f3-7fb59ca7ea93],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,b350dc94-868b-42a5-91f3-7fb59ca7ea93],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,b350dc94-868b-42a5-91f3-7fb59ca7ea93],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,b350dc94-868b-42a5-91f3-7fb59ca7ea93],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,b350dc94-868b-42a5-91f3-7fb59ca7ea93],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,b350dc94-868b-42a5-91f3-7fb59ca7ea93],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,b350dc94-868b-42a5-91f3-7fb59ca7ea93],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,b350dc94-868b-42a5-91f3-7fb59ca7ea93],CommitTime ,ExpirationTime ]
[-data.batch.ad,data.batch.ad,]::[OffsetMetadata[,b350dc94-868b-42a5-91f3-7fb59ca7ea93],CommitTime ,ExpirationTime ]
.......

[root@node101.yinzhengjie.org.cn ~]# kafka-console-consumer.sh --topic __consumer_offsets --bootstrap-server 10.1.2.114:9092 --formatter "kafka.coordinator.GroupMetadataManager\$OffsetsMessageFormatter" --consumer.config /soft/kafka/config/consumer.properties --from-beginning

3>. 0.11.0.0之后版本(含)

[root@node101.yinzhengjie.org.cn ~]# kafka-console-consumer.sh --topic __consumer_offsets --bootstrap-server 10.1.2.114:9092 --formatter "kafka.coordinator.group.GroupMetadataManager\$OffsetsMessageFormatter" --consumer.config /soft/kafka/config/consumer.properties --from-beginning

五.

六.

Kafka Offset相关命令总结的更多相关文章

  1. kafka的offset相关知识

    Offset存储模型 由于一个partition只能固定的交给一个消费者组中的一个消费者消费,因此Kafka保存offset时并不直接为每个消费者保存,而是以 groupid-topic-partit ...

  2. kafka 相关命令 偏移重置

    kafka官方文档 https://kafka.apache.org/documentation.html#quickstart kafka 安装文档 https://www.jianshu.com/ ...

  3. kafka的相关操作脚本

    总结最近用到的kafka相关命令和脚本. 1.创建Topic./kafka-topics.sh --zookeeper cc13-141:2182 --topic mytopic --replicat ...

  4. Redis key 相关命令

    其实本质上,Redis 就是一个Key---Value 数据库.这里我先介绍下Redis中关于的key的相关命令, 注意:key是字符串存储,但是不能使用 空格 或者 “\n”,value 则可以使用 ...

  5. redis-key相关命令

    本篇主要介绍和redis的key进行操作的相关命令. 命令 描述 复杂度 返回值 DEL key [key ...] 删除给定的一个或多个 key .不存在的 key 会被忽略.删除单个列表.集合.有 ...

  6. [Redis]Redis的五种数据类型与键值/服务器相关命令

    -------------------------------------------------------------------------------------- String(字符串):最 ...

  7. kafka集群监控工具之三--kafka Offset Monitor

    1.介绍 一般情况下,功能简单的kafka项目  使用运维命令+kafka Offset Monitor 就足够用了. 2.使用2.1 部署 github下载jar包 KafkaOffsetMonit ...

  8. 关于 Kafka offset

    查询topic的offset的范围 用下面命令可以查询到topic:Mytopic broker:SparkMaster:9092的offset的最小值: bin/kafka-run-class.sh ...

  9. redis03----集合 set 相关命令

    集合 set 相关命令 集合的性质: 唯一性,无序性,确定性 注: 在string和link的命令中,可以通过range 来访问string中的某几个字符或某几个元素 但,因为集合的无序性,无法通过下 ...

随机推荐

  1. Tyche 2191 WYF的递推式

    题目描述 WYF手中有这样一条递推式 WYF并不是想让你帮他做出结果,事实上,给定一个n,他能够迅速算出Fn.WYF只是想单纯的考验一下读者们. 输入描述 仅一行,三个整数N,F1,P 输出描述 仅一 ...

  2. NoClassDefFoundError与ClassNotFoundException

    原文地址: https://blog.csdn.net/jamesjxin/article/details/46606307 怎么解决NoClassDefFoundError错误 NoClassDef ...

  3. spring boot项目基本结构

    /==================================Controller @Controller public class SimpleController { @Autowired ...

  4. Modelsim脚本仿真文件分析

    Do文件的实质是tcl脚本,本质上是ascii文件.所以扩展名可以任意的,不一定叫xx.do,也可以叫xx.tcl,甚至叫成你的名字也没有关系.看自己喜好,一般取do,不过我喜欢取成tcl,用代码编辑 ...

  5. MT【297】任意四边形的一个向量性质

    在平面四边形$ABCD$中,已知$E,F,G,H$分别是棱$AB,BC,CD,DA$的中点,若$|EG|^2-|HF|^2=1,$设$|AD|=x,|BC|=y,|AB|=z,|CD|=1,$则$\d ...

  6. MT【294】函数定义的理解

    已知函数$f(x)$的定义域为$D,\pi\in D$.若$f(x)$的图像绕坐标原点逆时针旋转$\dfrac{\pi}{3}$后与原图像重合,则$f(\pi)$不可能是(    )A$\dfrac{ ...

  7. 最小表示法模板(洛谷P1368 工艺)(最小表示法)

    洛谷题目传送门 最小表示是指一个字符串通过循环位移变换(第一个移到最后一个)所能得到的字典序最小的字符串. 因为是环状的,所以肯定要先转化为序列,把原串倍长. 设决策点为一个表示法的开头.比较两个决策 ...

  8. 【JVM】查看JVM加载的类及类加载器的方法

    查看JVM加载了哪些类 java -verbose[:class|gc|jni] 在输出设备上显示虚拟机运行信息. java -verbose:class 在程序运行的时候有多少类被加载!你可以用ve ...

  9. 让自己的网站实现在线编辑office文档

    我们可以通过Office Web Apps(OWA)来实现在线编辑word,excel,power point, one note,并集成到自己的网站里去.   1 准备工作 1.1 操作系统 安装了 ...

  10. luogu3292 幸运数字 (点分治+线性基)

    首先第一眼是一个倍增套线性基,但是$O(Qlog^2Vlog^N)=10^{10}$的复杂度... 即使是st表也只是变成了$O(Nlog^2Vlog^N)$啊 考虑点分治,相对于倍增显著减少了线性基 ...