![]() |
Consumption Analytics Documentation |
There are two ways to round one or more resource values from processed records: using the RoundResourceValues transform processor, or using the rounding functionality in the CalculateResource transform processor’s expression
property.
Values specified when using RoundResourceValues
is based on the configured roundingMode
and scale, as shown in the following XML example:
<bean class="com.cloudcruiser.batch.transform.RoundResourceValues"> <property name="active" value="true" /> <property name="roundingMode" value="HALF_EVEN" /> <property name="scale" value="2" /> <property name="resourcePattern" value="temp.*" /> <property name="resources" value="Resource,AnotherResource" /> </bean>
For values specified with CalculateResource
, the rounding function expect two arguments: the decimal expression and the scale (integer), as shown in the following XML example:
<bean class="com.cloudcruiser.batch.transform.CalculateResource"> <property name="active" value="true" /> ... <property name="expression" value="ROUND(memUsed/1024, 2)" /> </bean>
where memUsed
is a resource ID.
(c) Copyright 2017-2020 Hewlett Packard Enterprise Development LP