[wangshumin@centoshostnameKL1 kafka_2.11-0.9.0.1]$
[wangshumin@centoshostnameKL1 kafka_2.11-0.9.0.1]$ bin/kafka-topics.sh
Option Description
------ -----------
--alter Alter the number of partitions,
replica assignment, and/or
configuration for the topic.
--config <name=value> A topic configuration override for the
topic being created or altered.The
following is a list of valid
configurations:
cleanup.policy
compression.type
delete.retention.ms
file.delete.delay.ms
flush.messages
flush.ms
index.interval.bytes
max.message.bytes
min.cleanable.dirty.ratio
min.insync.replicas
preallocate
retention.bytes
retention.ms
segment.bytes
segment.index.bytes
segment.jitter.ms
segment.ms
unclean.leader.election.enable
See the Kafka documentation for full
details on the topic configs.
--create Create a new topic.
--delete Delete a topic
--delete-config <name> A topic configuration override to be
removed for an existing topic (see
the list of configurations under the
--config option).
--describe List details for the given topics.
--help Print usage information.
--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 for a
topic that has a key, the partition
logic or ordering of the messages
will be affected
--replica-assignment A list of manual partition-to-broker
<broker_id_for_part1_replica1 : assignments for the topic being
broker_id_for_part1_replica2 , created or altered.
broker_id_for_part2_replica1 :
broker_id_for_part2_replica2 , ...>
--replication-factor <Integer: The replication factor for each
replication factor> partition in the topic being created.
--topic <topic> The topic to be create, alter or
describe. Can also accept a regular
expression except for --create option
--topics-with-overrides if set when describing topics, only
show topics that have overridden
configs
--unavailable-partitions if set when describing topics, only
show partitions whose leader is not
available
--under-replicated-partitions if set when describing topics, only
show under replicated partitions
--zookeeper <urls> REQUIRED: The connection string for
the zookeeper connection in the form
host:port. Multiple URLS can be
given to allow fail-over.
[wangshumin@centoshostnameKL1 kafka_2.11-0.9.0.1]$ bin/kafka-topics.sh --delete --topic test --zookeeper centoshostnameKL1:2181,centoshostnameKL2:2181,centoshostnameKL3:2181
Topic test is marked for deletion.
Note: This will have no impact if delete.topic.enable is not set to true.
[wangshumin@centoshostnameKL1 kafka_2.11-0.9.0.1]$ bin/kafka-topics.sh --list --zookeeper centoshostnameKL1:2181,centoshostnameKL2:2181,centoshostnameKL3:2181
default-flume-topic
itcast
kafkaTopic
test1
test2
wangshumin8888
wangshumintop
[wangshumin@centoshostnameKL1 kafka_2.11-0.9.0.1]$ bin/kafka-topics.sh --delete --topic itcast --zookeeper centoshostnameKL1:2181,centoshostnameKL2:2181,centoshostnameKL3:2181
Topic itcast is marked for deletion.
Note: This will have no impact if delete.topic.enable is not set to true.
[wangshumin@centoshostnameKL1 kafka_2.11-0.9.0.1]$ bin/kafka-topics.sh --delete --topic wangshumin8888 --zookeeper centoshostnameKL1:2181,centoshostnameKL2:2181,centoshostnameKL3:2181
Topic wangshumin8888 is marked for deletion.
Note: This will have no impact if delete.topic.enable is not set to true.
[wangshumin@centoshostnameKL1 kafka_2.11-0.9.0.1]$ bin/kafka-topics.sh --delete --topic wangshumintop --zookeeper centoshostnameKL1:2181,centoshostnameKL2:2181,centoshostnameKL3:2181
Topic wangshumintop is marked for deletion.
Note: This will have no impact if delete.topic.enable is not set to true.
[wangshumin@centoshostnameKL1 kafka_2.11-0.9.0.1]$ ll
总用量 60
drwxr-xr-x. 3 wangshumin wangshumin 4096 1月 26 12:34 bin
drwxr-xr-x. 2 wangshumin wangshumin 4096 3月 23 22:15 config
-rw-rw-r--. 1 wangshumin wangshumin 20144 1月 23 11:32 history
drwxrwxr-x. 5 wangshumin wangshumin 4096 4月 29 14:15 kafka-logs
drwxr-xr-x. 2 wangshumin wangshumin 4096 1月 23 08:43 libs
-rw-r--r--. 1 wangshumin wangshumin 11358 2月 12 2016 LICENSE
drwxrwxr-x. 2 wangshumin wangshumin 4096 4月 29 14:13 logs
-rw-r--r--. 1 wangshumin wangshumin 162 2月 12 2016 NOTICE
drwxr-xr-x. 2 wangshumin wangshumin 4096 2月 12 2016 site-docs
[wangshumin@centoshostnameKL1 kafka_2.11-0.9.0.1]$ bin/kafka-topics.sh --list --zookeeper centoshostnameKL1:2181,centoshostnameKL2:2181,centoshostnameKL3:2181
default-flume-topic
kafkaTopic
test1
test2
[wangshumin@centoshostnameKL1 kafka_2.11-0.9.0.1]$
[wangshumin@centoshostnameKL1 kafka_2.11-0.9.0.1]$ bin/kafka-topics.sh
Option Description
------ -----------
--alter Alter the number of partitions,
replica assignment, and/or
configuration for the topic.
--config <name=value> A topic configuration override for the
topic being created or altered.The
following is a list of valid
configurations:
cleanup.policy
compression.type
delete.retention.ms
file.delete.delay.ms
flush.messages
flush.ms
index.interval.bytes
max.message.bytes
min.cleanable.dirty.ratio
min.insync.replicas
preallocate
retention.bytes
retention.ms
segment.bytes
segment.index.bytes
segment.jitter.ms
segment.ms
unclean.leader.election.enable
See the Kafka documentation for full
details on the topic configs.
--create Create a new topic.
--delete Delete a topic
--delete-config <name> A topic configuration override to be
removed for an existing topic (see
the list of configurations under the
--config option).
--describe List details for the given topics.
--help Print usage information.
--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 for a
topic that has a key, the partition
logic or ordering of the messages
will be affected
--replica-assignment A list of manual partition-to-broker
<broker_id_for_part1_replica1 : assignments for the topic being
broker_id_for_part1_replica2 , created or altered.
broker_id_for_part2_replica1 :
broker_id_for_part2_replica2 , ...>
--replication-factor <Integer: The replication factor for each
replication factor> partition in the topic being created.
--topic <topic> The topic to be create, alter or
describe. Can also accept a regular
expression except for --create option
--topics-with-overrides if set when describing topics, only
show topics that have overridden
configs
--unavailable-partitions if set when describing topics, only
show partitions whose leader is not
available
--under-replicated-partitions if set when describing topics, only
show under replicated partitions
--zookeeper <urls> REQUIRED: The connection string for
the zookeeper connection in the form
host:port. Multiple URLS can be
given to allow fail-over.
[wangshumin@centoshostnameKL1 kafka_2.11-0.9.0.1]$ bin/kafka-topics.sh --delete --topic test --zookeeper centoshostnameKL1:2181,centoshostnameKL2:2181,centoshostnameKL3:2181
Topic test is marked for deletion.
Note: This will have no impact if delete.topic.enable is not set to true.
[wangshumin@centoshostnameKL1 kafka_2.11-0.9.0.1]$ bin/kafka-topics.sh --list --zookeeper centoshostnameKL1:2181,centoshostnameKL2:2181,centoshostnameKL3:2181
default-flume-topic
itcast
kafkaTopic
test1
test2
wangshumin8888
wangshumintop
[wangshumin@centoshostnameKL1 kafka_2.11-0.9.0.1]$ bin/kafka-topics.sh --delete --topic itcast --zookeeper centoshostnameKL1:2181,centoshostnameKL2:2181,centoshostnameKL3:2181
Topic itcast is marked for deletion.
Note: This will have no impact if delete.topic.enable is not set to true.
[wangshumin@centoshostnameKL1 kafka_2.11-0.9.0.1]$ bin/kafka-topics.sh --delete --topic wangshumin8888 --zookeeper centoshostnameKL1:2181,centoshostnameKL2:2181,centoshostnameKL3:2181
Topic wangshumin8888 is marked for deletion.
Note: This will have no impact if delete.topic.enable is not set to true.
[wangshumin@centoshostnameKL1 kafka_2.11-0.9.0.1]$ bin/kafka-topics.sh --delete --topic wangshumintop --zookeeper centoshostnameKL1:2181,centoshostnameKL2:2181,centoshostnameKL3:2181
Topic wangshumintop is marked for deletion.
Note: This will have no impact if delete.topic.enable is not set to true.
[wangshumin@centoshostnameKL1 kafka_2.11-0.9.0.1]$ ll
总用量 60
drwxr-xr-x. 3 wangshumin wangshumin 4096 1月 26 12:34 bin
drwxr-xr-x. 2 wangshumin wangshumin 4096 3月 23 22:15 config
-rw-rw-r--. 1 wangshumin wangshumin 20144 1月 23 11:32 history
drwxrwxr-x. 5 wangshumin wangshumin 4096 4月 29 14:15 kafka-logs
drwxr-xr-x. 2 wangshumin wangshumin 4096 1月 23 08:43 libs
-rw-r--r--. 1 wangshumin wangshumin 11358 2月 12 2016 LICENSE
drwxrwxr-x. 2 wangshumin wangshumin 4096 4月 29 14:13 logs
-rw-r--r--. 1 wangshumin wangshumin 162 2月 12 2016 NOTICE
drwxr-xr-x. 2 wangshumin wangshumin 4096 2月 12 2016 site-docs
[wangshumin@centoshostnameKL1 kafka_2.11-0.9.0.1]$ bin/kafka-topics.sh --list --zookeeper centoshostnameKL1:2181,centoshostnameKL2:2181,centoshostnameKL3:2181
default-flume-topic
kafkaTopic
test1
test2
[wangshumin@centoshostnameKL1 kafka_2.11-0.9.0.1]$