mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-04 03:42:08 +08:00
修复"新添加集群的时候,报watch的空指针异常"问题 & 修复"删除废弃Topic之后,Topic资源治理没有同步删除"问题
This commit is contained in:
@@ -17,4 +17,6 @@ public interface TopicExpiredDao {
|
||||
int replace(TopicExpiredDO expiredDO);
|
||||
|
||||
TopicExpiredDO getByTopic(Long clusterId, String topicName);
|
||||
|
||||
int deleteByName(Long clusterId, String topicName);
|
||||
}
|
||||
@@ -50,4 +50,12 @@ public class TopicExpiredDaoImpl implements TopicExpiredDao {
|
||||
params.put("topicName", topicName);
|
||||
return sqlSession.selectOne("TopicExpiredDao.getByTopic", params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteByName(Long clusterId, String topicName) {
|
||||
Map<String, Object> params = new HashMap<>(2);
|
||||
params.put("clusterId", clusterId);
|
||||
params.put("topicName", topicName);
|
||||
return sqlSession.delete("TopicExpiredDao.deleteByName", params);
|
||||
}
|
||||
}
|
||||
@@ -36,4 +36,8 @@
|
||||
<select id="getByTopic" parameterType="java.util.Map" resultMap="TopicExpiredMap">
|
||||
SELECT * FROM topic_expired WHERE cluster_id = #{clusterId} AND topic_name = #{topicName}
|
||||
</select>
|
||||
|
||||
<delete id="deleteByName" parameterType="java.util.Map">
|
||||
DELETE FROM topic_expired WHERE cluster_id=#{clusterId} AND topic_name=#{topicName}
|
||||
</delete>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user