我遇到以下问题,也许有人可以帮我提示要看的地方。 我的项目: -kafka版本1.1.1,spring-boot应用程序中的kafka-streams,为集成测试,macosx,jdk 1.8提供了EmbeddedKafka
在我的流配置中,我有: -1个全局ktable, -1家全球商店和 -1家州立商店, -1个处理器和1个变压器,用于全球存储和 -1个带有标点(WALL_CLOCK_TIME)的状态存储变压器。
我介绍了CleanupConfig,以在我的集成测试中调用KafkaStreams.cleanUp()onClose。这适用于全局存储,但不适用于尚未删除的状态存储。我打开了对kafka StateDirectory的登录,这就是我所看到的。 在我的集成测试开始之前:
$.ajax({
url: 'https://api.spotify.com/v1/me/player/pause',
type: 'PUT',
headers: {
'Authorization': 'Bearer ' + access_token
}
});
请注意,它已获得任务2_0的锁定
集成测试后:
14:39:58.609 [kstreams-3892e198-bf56-4ac1-bd21-68c580309d4d-GlobalStreamThread] DEBUG o.a.k.s.p.internals.StateDirectory - stream-thread [kstreams-3892e198-bf56-4ac1-bd21-68c580309d4d-GlobalStreamThread] Acquired global state dir lock
14:39:59.153 [kstreams-3892e198-bf56-4ac1-bd21-68c580309d4d-StreamThread-1] DEBUG o.a.k.s.p.internals.StateDirectory - stream-thread [kstreams-3892e198-bf56-4ac1-bd21-68c580309d4d-StreamThread-1] Acquired state dir lock for task 2_0
请注意,未将任务2_0的删除目录称为
EmbeddedKafka关闭后,这是来自kafka流的日志。
14:40:07.079 [kstreams-3892e198-bf56-4ac1-bd21-68c580309d4d-GlobalStreamThread] DEBUG o.a.k.s.p.internals.StateDirectory - stream-thread [kstreams-3892e198-bf56-4ac1-bd21-68c580309d4d-GlobalStreamThread] Released global state dir lock
14:40:17.032 [Thread-6] DEBUG o.a.k.s.p.internals.StateDirectory - stream-thread [Thread-6] Acquired state dir lock for task 1_0
14:40:17.032 [Thread-6] INFO o.a.k.s.p.internals.StateDirectory - stream-thread [Thread-6] Deleting state directory 1_0 for task 1_0 as user calling cleanup.
14:40:17.033 [Thread-6] DEBUG o.a.k.s.p.internals.StateDirectory - stream-thread [Thread-6] Released state dir lock for task 1_0
这里可能出什么问题了?预先感谢。