删除kafka的topics

参考:

http://www.bubuko.com/infodetail-2859810.html

https://blog.csdn.net/russle/article/details/82881297

https://blog.csdn.net/dianyueneo/article/details/37527087

https://blog.csdn.net/little_fxc/article/details/98494263

<code>

kafka-topics.sh –delete –zookeeper localhost:2181 –topic `kafka-topics.sh –list –zookeeper localhost:2181`
while read line
do
echo $line
kafka-configs.sh –zookeeper localhost:2181 –alter –entity-name $line –entity-type topics –add-config retention.ms=1000
kafka-config.sh –zookeeper localhost:2181 –alter –entity-name $line –entity-type topics -add-config cleanup.policy=delete
kafka-topics.sh –delete –zookeeper localhost:2181 –topic $line
done < /opt/tmp.topics2

</code>

kafka清理策略

https://www.orchome.com/23    kafka压缩策略

https://blog.csdn.net/u013256816/article/details/80487758   kafka压缩过程

https://www.cnblogs.com/51python/p/10966757.html  kafka参数详解

https://blog.csdn.net/abc123lzf/article/details/100738169  kafka清理策略

http://kafka.apache.org/documentation/#topicconfigs  kafka官方配置

https://blog.csdn.net/Curry_lee_3/article/details/102382743   kafka压缩实战

 

ubuntu ip

首先编辑/etc/network/interfaces 文件,在终端中执行下面的命令

sudo vi /etc/network/interfaces

配置静态IP地址

要编辑的内容如下:

auto eth0 ##自动启用第一块网卡

ifconf eth0 inet static

address 192.168.1.2 ##IP地址

netmask 255.255.255.0 ##子网掩码

gateway 192.168.1.1 ##网关

也可以这样:

在终端里输入

sudo ifconfig address 192.168.1.2 ##设置IP

sudo ifconfig netmask 255.255.255.0##设置子网掩码

sudo ifconfig gateway 192.158.1.1 ##设置网关

再然后就是配置DNS

sudo vi /etc/resolv.conf

增加内容:

nameserver 61.177.7.1

配置网关

sudo route add default gw 192.168.0.1

重新启动网络配置

/etc/init.d/networking restart