All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ui.topics.partitionStats.ftl Maven / Gradle / Ivy

There is a newer version: 0.8.0
Show newest version
<#-- @ftlvariable name="topicName"  type="java.lang.String" -->
<#-- @ftlvariable name="clusterIdentifier"  type="java.lang.String" -->
<#-- @ftlvariable name="topicStatus"  type="com.infobip.kafkistry.service.topic.TopicClusterStatus" -->
<#-- @ftlvariable name="topicOffsets" type="com.infobip.kafkistry.service.topic.offsets.TopicOffsets" -->
<#-- @ftlvariable name="topicReplicas" type="com.infobip.kafkistry.kafkastate.TopicReplicaInfos" -->


<#-- @ftlvariable name="topicStatus"  type="com.infobip.kafkistry.service.topic.TopicClusterStatus" -->

<#import "../common/util.ftl" as _util>
<#import "../common/infoIcon.ftl" as _info_>
<#import "../sql/sqlQueries.ftl" as sql>

<#assign retentionMs = (topicStatus.existingTopicInfo.config["retention.ms"].value?number)!-1>
<#assign retentionBytes = (topicStatus.existingTopicInfo.config["retention.bytes"].value?number)!-1>

Partition stats <@sql.topicProduceRates cluster=clusterIdentifier topic=topicName/> <@sql.topicSizeVsTimeRetention cluster=clusterIdentifier topic=topicName/>
<#assign partitions = (topicOffsets.partitionsOffsets?keys)!(topicReplicas.partitionBrokerReplicas?keys)!(oldestRecordAges?keys)![]> <#assign lowProvisionPartitions = (topicStatus.externInspectInfo["com.infobip.kafkistry.service.topic.inspectors.TopicUnderprovisionedRetentionInspector"])!{}> <#-- @ftlvariable name="lowProvisionPartitions" type="java.util.Map" --> <#assign unevenRatePartitions = (topicStatus.externInspectInfo["com.infobip.kafkistry.service.topic.inspectors.TopicUnevenPartitionProducingInspector"])!{}> <#-- @ftlvariable name="unevenRatePartitions" type="java.util.Map" --> <#list partitions?sort as partition> <#-- Partition --> <#-- Brokers --> <#-- Messages --> <#if (topicOffsets.partitionMessageRate?api.get(partition).upTo15MinRate)??> <#assign rateMsgPerSec = topicOffsets.partitionMessageRate?api.get(partition).upTo15MinRate> <#assign lowRate = false> <#assign highRate = false> <#if unevenRatePartitions?size gt 0> <#assign lowRate = (unevenRatePartitions.lowRate?api.get(partition))??> <#assign highRate = (unevenRatePartitions.highRate?api.get(partition))??> <#-- Produce rate --> <#else> <#-- Produce rate --> <#if (topicReplicas.partitionBrokerReplicas?api.get(partition))??> <#assign partitionBrokerReplicas = topicReplicas.partitionBrokerReplicas?api.get(partition)> <#assign sizeBytes = 0> <#list partitionBrokerReplicas as broker, replica> <#assign sizeBytes = (replica.sizeBytes gt sizeBytes)?then(replica.sizeBytes, sizeBytes)> <#-- Replica size --> <#if retentionBytes gt 0> <#-- % of retention.bytes --> <#else> <#-- % of retention.bytes --> <#else> <#-- Replica size --> <#-- % of retention.bytes --> <#if (oldestRecordAges?api.get(partition))??> <#assign ageMs = oldestRecordAges?api.get(partition)> <#assign underprovisioned = false> <#if lowProvisionPartitions?size gt 0> <#assign underprovisioned = (lowProvisionPartitions?api.get(partition))??> <#-- Oldest record age --> <#if retentionMs gt 0> <#-- % of retention.ms --> <#else> <#-- % of retention.ms --> <#else> <#assign oldestDisabledDoc> Sampling of oldest records timestamps is disabled
Enable it by setting one of following application properties:
  • OLDEST_RECORD_AGE_ENABLED = true
  • app.oldest-record-age.enabled = true
<#assign oldestDisabledCell> <#if oldestRecordAgesDisabled> ${oldestDisabledCell} <#-- Oldest record age --> ${oldestDisabledCell} <#-- % of retention.ms --> <#else> <#-- Oldest record age --> <#-- % of retention.ms -->
Partition Brokers Messages <#include "numMessagesEstimateDoc.ftl"> Produce rate Replica size % of retention.bytes Oldest record age % of retention.ms
${partition?c} <#if (topicStatus.existingTopicInfo.partitionsAssignments)??> <#list topicStatus.existingTopicInfo.partitionsAssignments as assignment> <#if assignment.partition == partition> <#list assignment.replicasAssignments as replica> ${replica.brokerId?c}<#if !replica?is_last>, <#else> --- <#if (topicOffsets.partitionsOffsets?api.get(partition))??> <#assign offsets = topicOffsets.partitionsOffsets?api.get(partition)> ${_util.prettyNumber(offsets.end - offsets.begin)} <#assign offsetTooltip> Begin: ${offsets.begin?c}
End: ${offsets.end?c}
<@_info_.icon tooltip=offsetTooltip/> <#else> ---
${_util.prettyNumber(rateMsgPerSec)} msg/sec <#if highRate> <@_info_.icon tooltip="This is a high produce rate partition"/> <#if lowRate> <@_info_.icon tooltip="This is a low produce rate partition"/> --- ${_util.prettyDataSize(sizeBytes)} ${_util.prettyNumber(100*sizeBytes/retentionBytes)} % --- ------ ${_util.prettyDuration(ageMs / 1000)} <#if underprovisioned> <#assign underprovisionTooltip> This partition has lower effective retention than wanted retention.ms due to low retention.bytes <@_info_.icon tooltip=underprovisionTooltip/> ${_util.prettyNumber(100*ageMs/retentionMs)} % --- DISABLED <@_info_.icon tooltip=oldestDisabledDoc/> ------




© 2015 - 2024 Weber Informatics LLC | Privacy Policy