in src/main/java/org/apache/pulsar/manager/mapper/TopicsStatsMapper.java [84:105]
Page<TopicStatsEntity> findByMultiTopic(
@Param("environment") String environment,
@Param("tenant") String tenant,
@Param("namespace") String namespace,
@Param("persistent") String persistent,
@Param("topicList") List<String> topicList,
@Param("timestamp") long timestamp);
@Select({"<script>",
"SELECT environment, tenant,"
+ "sum(producer_count) as producerCount,"
+ "sum(subscription_count) as subscriptionCount,"
+ "sum(msg_rate_in) as msgRateIn,"
+ "sum(msg_throughput_in) as msgThroughputIn,"
+ "sum(msg_rate_out) as msgRateOut,"
+ "sum(msg_throughput_out) as msgThroughputOut,"
+ "avg(average_msg_size) as averageMsgSize,"
+ "sum(storage_size) as storageSize, time_stamp FROM topics_stats",
"WHERE environment=#{environment} and time_stamp=#{timestamp} and " +
"tenant IN <foreach collection='tenantList' item='tenant' open='(' separator=',' close=')'> #{tenant} </foreach>" +
"GROUP BY environment, tenant, time_stamp" +
"</script>"})