Consumption Analytics Documentation

Home > Documentation for older versions > Cloud Cruiser 3 > Batch XML Reference > Transform processors > ApplyStateChanges


Table of contents
No headers

Adds a state identifier based on historical log of state changes. This transform processor will split input records at state changes that occur within the record’s usage time frame and set a " state " identifier value accordingly. This reads state change history from flat file in the following format:



<bean class="com.cloudcruiser.batch.transform.ApplyStateChange">


<property name="keyIdentifiers" value="keyIdentifiers
" />

Sets the key identifiers.

<property name="targetIndentifier" value="targetIndentifier
" />

Sets the target identifier.

<property name="defaultValue" value="defaultValue
" />

Sets a default value for the state identifier. This default is assumed when no state change history is found for a record based on key identifier values.

<property name="stateChangeInput" value="stateChangeInput
" />

Sets the input resource providing state change records in the format of timeStamp , keyValue , identifierValue .

<property name="stateChangeTimeZone" value="stateChangeTimeZone
" />

Sets the time zone for the state change records so that timestamps are properly converted to the same time zone as usage data. For the syntax of a custom time zone IDs, see See Time zone syntax..

<property name="dateTimePattern" value="dateTimePattern
" />

Sets the date and time pattern.

<property name="encoding" value="encoding
" />

Sets the encoding.

<property name="commentChars" value="commentChars
" />

Sets the comment characters.

Spring Batch XML Example

<batch:step id="transform" next="charge">
    <bean class="com.cloudcruiser.batch.CCRecordTransformTasklet">
      <property name="processors">
          <bean class="com.cloudcruiser.batch.transform.ApplyStateChanges">
            <property name="active" value="true" />
            <property name="keyIdentifiers" value="VMName" />
            <property name="targetIdentifier" value="state" />
            <property name="defaultValue" value="started" />
            <property name="stateChangeInput" value="${env.usageDir}/stopstart.log" />
            <property name="stateChangeTimeZone" value="GMT-00:00" />
            <property name="dateTimePattern" value="yyyyMMdd HH:mm:ss" />
            <property name="encoding" value="UTF-8" />
            <property name="commentChars" value="#" />
            <property name="exceptionProcessing" value="true" />
Last modified


This page has no custom tags.


This page has no classifications.

 (c) Copyright 2017-2020 Hewlett Packard Enterprise Development LP