<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                **查看創建Topic有哪些參數** ```shell [root@hadoop101 kafka]# bin/kafka-topics.sh --create 要創建一個topic --topic 指定topic的名字 --zookeeper 指定要連接的zookeeper --replication-factor 設置副本因子,這個數值不能大于Broker數量, 即不能大于節點數 --partitions 分區數量 ... ``` **查看當前服務器所有的Topic** ```shell [root@hadoop101 kafka]# bin/kafka-topics.sh --list --zookeeper hadoop101:2181 __consumer_offsets event_attendees events ``` **創建新的Topic** ```shell --topic Topic的名字 --partitions Topic的分區 --replication-factor Topic的副本,如果只有一臺服務器則只能設置一個副本 [root@hadoop101 kafka]# bin/kafka-topics.sh --zookeeper hadoop101:2181 --create --topic topicName --partitions 2 --replication-factor 1 Created topic "topicName". ``` **查看某一個Topic的詳細信息** ```shell [root@hadoop101 kafka]# bin/kafka-topics.sh --describe --zookeeper hadoop101:2181 --topic topicName Topic:topicName PartitionCount:2 ReplicationFactor:1 Configs: Topic: topicName Partition: 0 Leader: 0 Replicas: 0 Isr: 0 Topic: topicName Partition: 1 Leader: 0 Replicas: 0 Isr: 0 ``` **查看所有Topic的詳細信息** ```shell [root@hadoop101 kafka]# bin/kafka-topics.sh --describe --zookeeper hadoop101:2181 Topic:topicName PartitionCount:2 ReplicationFactor:1 Configs: Topic: topicName Partition: 0 Leader: 0 Replicas: 0 Isr: 0 Topic: topicName Partition: 1 Leader: 0 Replicas: 0 Isr: 0 Topic:user_friends PartitionCount:1 ReplicationFactor:1 Configs: Topic: user_friends Partition: 0 Leader: 0 Replicas: 0 Isr: 0 ``` **查看某個Topic下是否有數據** ```shell [root@hadoop101 kafka]# bin/kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list hadoop101:9092 --topic topicName user_friends_raw:0:38204 // 數字大于0則有 user_friends_raw:0:0 // 數字為0則無 ``` **刪除某一個Topic** ```shell [root@hadoop101 kafka]# bin/kafka-topics.sh --zookeeper hadoop101:2181 --delete --topic topicName ``` **啟動消費者** ```shell --from-beginning 代表從頭消費 [root@hadoop101 kafka]# bin/kafka-console-consumer.sh --bootstrap-server hadoop101:9092 --topic topicName --from-beginning ``` **啟動生產者** ```shell [root@hadoop101 kafka]# bin/kafka-console-producer.sh --broker-list hadoop101:9092 --topic topicName ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看