我在Kafka中创建的每个主题都将其删除。
.\bin\windows\kafka-topics.bat --zookeeper localhost:2181 --delete --topic linlin6
Topic linlin6 is marked for deletion.
我在delete.topic.enable=true
中设置了server.properties
它向我显示相同的消息,下次我启动Zookeeper
卡夫卡会给我这样的错误:
java.nio.file.AccessDeniedException: D:\WEBSOCKET\kafka_2.12-2.1.0\logs\linlin6-0 -> D:\WEBSOCKET\kafka_2.12-2.1.0\logs\linlin6-0.bd274201d28e45caa9b23ed1cd0ac56e-delete
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
at sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:387)
at sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:287)
at java.nio.file.Files.move(Files.java:1395)
at org.apache.kafka.common.utils.Utils.atomicMoveWithFallback(Utils.java:809)
at kafka.log.Log.$anonfun$renameDir$2(Log.scala:728)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
at kafka.log.Log.maybeHandleIOException(Log.scala:1927)
at kafka.log.Log.renameDir(Log.scala:726)
at kafka.log.LogManager.asyncDelete(LogManager.scala:842)
at kafka.cluster.Partition.$anonfun$delete$1(Partition.scala:353)
at kafka.utils.CoreUtils$.inLock(CoreUtils.scala:251)
at kafka.utils.CoreUtils$.inWriteLock(CoreUtils.scala:259)
at kafka.cluster.Partition.delete(Partition.scala:347)
at kafka.server.ReplicaManager.stopReplica(ReplicaManager.scala:350)
at kafka.server.ReplicaManager.$anonfun$stopReplicas$2(ReplicaManager.scala:380)
at scala.collection.Iterator.foreach(Iterator.scala:937)
at scala.collection.Iterator.foreach$(Iterator.scala:937)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1425)
at scala.collection.IterableLike.foreach(IterableLike.scala:70)
at scala.collection.IterableLike.foreach$(IterableLike.scala:69)
at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
at kafka.server.ReplicaManager.stopReplicas(ReplicaManager.scala:378)
at kafka.server.KafkaApis.handleStopReplicaRequest(KafkaApis.scala:200)
at kafka.server.KafkaApis.handle(KafkaApis.scala:111)
at kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:69)
at java.lang.Thread.run(Thread.java:745)
Suppressed: java.nio.file.AccessDeniedException: D:\WEBSOCKET\kafka_2.12-2.1.0\logs\linlin6-0 -> D:\WEBSOCKET\kafka_2.12-2.1.0\logs\linlin6-0.bd274201d28e45caa9b23ed1cd0ac56e-delete
事件我将delete.topic.enable = true设置为: 主题linlin6已标记为删除。
并且下次无法通过我再次打开它时,请删除Kafka中的日志 Zookeeper中的数据和数据...
我在哪里设置错误或做错了什么?