mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-03 19:38:20 +08:00
v2.1版本更新
This commit is contained in:
@@ -31,4 +31,6 @@ public interface TopicThrottledMetricsDao {
|
||||
List<TopicThrottledMetricsDO> getAppIdThrottle(long clusterId, String appId, Date startTime, Date endTime);
|
||||
|
||||
List<TopicThrottledMetricsDO> getLatestTopicThrottledMetrics(Long clusterId, Date afterTime);
|
||||
|
||||
int deleteBeforeTime(Date endTime);
|
||||
}
|
||||
|
||||
@@ -73,4 +73,9 @@ public class TopicThrottledMetricsDaoImpl implements TopicThrottledMetricsDao {
|
||||
}
|
||||
return new ArrayList<>(throttleMap.values());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteBeforeTime(Date endTime) {
|
||||
return sqlSession.delete("TopicThrottledMetricsDao.deleteBeforeTime", endTime);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,4 +54,9 @@
|
||||
AND gmt_create > #{afterTime}
|
||||
</select>
|
||||
|
||||
<delete id="deleteBeforeTime" parameterType="java.util.Date">
|
||||
<![CDATA[
|
||||
DELETE FROM topic_throttled_metrics WHERE gmt_create < #{endTime} LIMIT 3000
|
||||
]]>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user