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

ui.consume.partitionReadStats.ftl Maven / Gradle / Ivy

There is a newer version: 0.8.0
Show newest version
<#-- @ftlvariable name="partitionsStats" type="java.util.Map" -->

<#import "../common/util.ftl" as util>
<#import "progressBar.ftl" as pb>


    <#list partitionsStats as partition, partitionStatus>
        <#macro prettyPercentage value zeroDivDefault partitionStatus>
            <#assign partitionSize = partitionStatus.endOffset - partitionStatus.beginOffset>
            <#if partitionSize <= 0>
                <#assign percentage = "${zeroDivDefault}%">
            <#else>
                <#assign percentage = "${util.prettyNumber(100.0 * value / partitionSize)}%">
            (${percentage})
        <#macro offsetPercentage offset zeroDivDefault partitionStatus>
            <#assign fromBegin = offset - partitionStatus.beginOffset>
            <@prettyPercentage value=fromBegin zeroDivDefault=zeroDivDefault partitionStatus=partitionStatus/>
        
Partition Processed offsets Processed Accepted Reached end
${partition}
${partitionStatus.startedAtOffset} <@offsetPercentage offset=partitionStatus.startedAtOffset zeroDivDefault=0.0 partitionStatus=partitionStatus/> <#if partitionStatus.startedAtTimestamp??>
${partitionStatus.endedAtOffset} <@offsetPercentage offset=partitionStatus.endedAtOffset zeroDivDefault=100.0 partitionStatus=partitionStatus/> <#if partitionStatus.endedAtTimestamp??>
${partitionStatus.read} <@prettyPercentage value=partitionStatus.read zeroDivDefault=0.0 partitionStatus=partitionStatus/> <#if partitionStatus.startedAtTimestamp?? && partitionStatus.endedAtTimestamp??>
<#assign timeRange = partitionStatus.endedAtTimestamp - partitionStatus.startedAtTimestamp> ${util.prettyDuration(timeRange/1000.0)}
${partitionStatus.matching} <#if partitionStatus.reachedEnd> YES <#else> NO <#if partitionStatus.remaining gt 0> ${partitionStatus.remaining} <@prettyPercentage value=partitionStatus.remaining zeroDivDefault=0.0 partitionStatus=partitionStatus/>
<#assign skip = partitionStatus.startedAtOffset-partitionStatus.beginOffset> <#assign preRetention = 0> <#if skip lt 0> <#assign preRetention = -skip> <#assign skip = 0> <#assign read = partitionStatus.read> <#assign remain = partitionStatus.remaining> <#assign totalSum = preRetention + skip + read + remain> <@pb.progressBar total=totalSum preRetention=preRetention skip=skip read=read remain=remain/>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy