Kafka0.8.1 常用操作
Kafka的版本间差异较大,下面是0.8.1的操作方法 首先cd到kafaka的bin目录下,操作kafka的工具都在这里呢。如果发现找不到,或者名字不对,说明kafka版本不对。 以topic是test为例子 –zookeeper 后的ip改成你们自己的 创建topic ./kafka-topics.sh –topic t
Kafka的版本间差异较大,下面是0.8.1的操作方法
首先cd到kafaka的bin目录下,操作kafka的工具都在这里呢。如果发现找不到,或者名字不对,说明kafka版本不对。
以topic是test为例子
–zookeeper 后的ip改成你们自己的
创建topic
./kafka-topics.sh –topic test –create –partitions 2 –replication-factor 1 –zookeeper 10.234.10.17:2181,10.234.10.20:2181
partitions 为分区数,0.8.1默认就是2
replication-factor:为复制因子,也就是副本数
查看所有topic
./kafka-topics.sh –list –zookeeper 10.234.10.17:2181,10.234.10.20:2181
删除topic
./kafka-topics.sh –topic test –delete –zookeeper 10.234.10.17:2181,10.234.10.20:2181
查看topic明细
./kafka-topics.sh –topic test –describe –zookeeper 10.234.10.17:2181,10.234.10.20:2181
查看不可用分区
./kafka-topics.sh –topic test –describe –unavailable-partitions –zookeeper 10.234.10.17:2181,10.234.10.20:2181
不知道什么原因就会导致部分分区不可用,用这个命令可以查看。
原文地址:Kafka0.8.1 常用操作, 感谢原作者分享。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

To update the curl version under Linux, you can follow the steps below: Check the current curl version: First, you need to determine the curl version installed in the current system. Open a terminal and execute the following command: curl --version This command will display the current curl version information. Confirm available curl version: Before updating curl, you need to confirm the latest version available. You can visit curl's official website (curl.haxx.se) or related software sources to find the latest version of curl. Download the curl source code: Using curl or a browser, download the source code file for the curl version of your choice (usually .tar.gz or .tar.bz2

The meaning and difference of PHP version NTS PHP is a popular server-side scripting language that is widely used in the field of web development. There are two main versions of PHP: ThreadSafe(TS) and Non-ThreadSafe(NTS). On the official website of PHP, we can see two different PHP download versions, namely PHPNTS and PHPTS. So, what does PHP version NTS mean? What is the difference between it and the TS version? Next,

How to easily check the installed version of Oracle requires specific code examples. As a software widely used in enterprise-level database management systems, the Oracle database has many versions and different installation methods. In our daily work, we often need to check the installed version of the Oracle database for corresponding operations and maintenance. This article will introduce how to easily check the installed version of Oracle and give specific code examples. Method 1: Through SQL query in the Oracle database, we can

Regarding Llama3, new test results have been released - the large model evaluation community LMSYS released a large model ranking list. Llama3 ranked fifth, and tied for first place with GPT-4 in the English category. The picture is different from other benchmarks. This list is based on one-on-one battles between models, and the evaluators from all over the network make their own propositions and scores. In the end, Llama3 ranked fifth on the list, followed by three different versions of GPT-4 and Claude3 Super Cup Opus. In the English single list, Llama3 overtook Claude and tied with GPT-4. Regarding this result, Meta’s chief scientist LeCun was very happy and forwarded the tweet and

LinuxDeploy operating steps and precautions LinuxDeploy is a powerful tool that can help users quickly deploy various Linux distributions on Android devices, allowing users to experience a complete Linux system on their mobile devices. This article will introduce the operating steps and precautions of LinuxDeploy in detail, and provide specific code examples to help readers better use this tool. Operation steps: Install LinuxDeploy: First, install

The Chrome browser is currently the browser with the largest number of users and high praise, and is committed to providing users with a comprehensive and fast experience. Some netizens feel that the old version is still easier to use after updating Google Chrome. If they want to downgrade the version of Google Chrome, what should they do? Let’s take a look at the detailed operation method of downgrading Google Chrome! The specific method of downgrading Chrome is to close the Chrome process, open the directory where chrome.exe is located (Application), delete chrome.exe, rename old_chrome.exe to chrome.exe, and delete the \UserData\Default\Web Data file (do not delete this

Friends in the workplace must be familiar with PPT production! Whether it is year-end summaries or commercial bidding, etc., PPT is often used to express it. However, for those who are new to PPT production, they don’t know much about the PPT versions. Let’s take stock of a few PPTs. Version. 1. PPT2003PowerPower2003 is an office software. It has a simple interface, fast operation, easy to use, and does not require high computer configuration. It has basic functions such as word processing, image processing, graphics editing, animation operation, and multimedia insertion. 2. PPT2007PowerPoint2007 inherits the advantages of the previous version and has greatly improved its functions. Get used to PowerPoint

With the popularity of smartphones, the screenshot function has become one of the essential skills for daily use of mobile phones. As one of Huawei's flagship mobile phones, Huawei Mate60Pro's screenshot function has naturally attracted much attention from users. Today, we will share the screenshot operation steps of Huawei Mate60Pro mobile phone, so that everyone can take screenshots more conveniently. First of all, Huawei Mate60Pro mobile phone provides a variety of screenshot methods, and you can choose the method that suits you according to your personal habits. The following is a detailed introduction to several commonly used interceptions:
