purge set command

The purge set command sets the time and type of data purge for transactional storage data in the data grid.

Usage notes

You cannot control the total number of records that you purge. You can control only the number of records that you purge per partition.

You can estimate the total number of records that you can purge by multiplying the number of partitions times the value of the maxNumRecordsPerPurgeCycle parameter. The number of partitions are identified in an objectGridDeployment.xml file that is created during the installation.

To find the number of partitions, perform the following task:
  1. Open the install_dir\Members\WXSContainer\usr\servers\WXSContainer\grids directory.
  2. Open the subdirectory for the area that you want to purge:
    • Base
    • Comms
    • Identity
    • Infrastructure
    • MessageFabric
  3. Open the objectGridDeployment.xml file.
  4. Use the mapset element to determine the number of partitions in the map that you want to purge.

    For example, in the Comms subdirectory, the objectGridDeployment.xml file might include the following code:

    <mapSet name="AS2StateLogDataMapSet" numberOfPartitions="11" 
            minSyncReplicas="0" maxSyncReplicas="2" 
            developmentMode="false">
      <map ref="ProcessStateLogMap">   
      <map ref="ProcessMessageDupLogMap">  
    </mapSet>
    In this example, if you are purging ProcessStateLogMap (<map ref="ProcessStateLogMap">), there are 11 partitions (numberOfPartitions="11").

Environment

  • Windows 2008
  • Linux

Authorization

Administrative user

Syntax

The format of the purge set command depends on the type of purge that you are performing. The first parameter describes the purge type.

If you want to immediately purge data, do not specify a purge start time (the startDateTime parameter). After you enter the command, you are prompted for a start time. Press Enter to accept the default value of now.

  • execute purge set <ProcessStateLogMap|ProcessMessageDupLogMap|SFSDocument|SFSDocumentData> [-a <olderThanAgeInDays>] [-n <numRecordsPerBatch>] [-m <maxNumRecordsPerPurgeCycle>]  [-i <intervalInSecondsBetweenPurge>] [-s <startDateTime>]
  • execute purge set <SuccessfulExchangeEvents|FailedExchangeEvents|InProgressExchangeEvents> [-w <auditDataWriteLocation> ] [-a <olderThanAgeInDays>] [-n <numRecordsPerBatch>] [-m <maxNumRecordsPerPurgeCycle>] [-i <intervalInSecondsBetweenPurge>] [-s <startDateTime>]
  • execute purge set <Aggregator> [-d <retentionDepth> ] [-i <intervalInSecondsBetweenPurge>] [-s <startDateTime>]
  • execute purge set <PullDestinationRuntimeData> [-i <intervalInSecondsBetweenPurge>] [-s <startDateTime>]

Option descriptions

(Purge type)
  • ProcessStateLogMap - Inbound and outbound Async transaction events.
  • ProcessMessageDupLogMap - Possible duplicate inbound messages.
  • SFSDocument - All outbound and inbound Async transaction events.
  • SFSDocumentData - Data for all outbound and inbound Async transactions that are in progress.
  • PullDestinationRuntimeData - Data for transactions that were sent to pull destinations.
  • Aggregator - Provisioning and lifecycle history for deployed services.
  • SuccessfulExchangeEvents - Visibility events for exchnges that completed successfully. Exchanges that reach a terminal state with a status of SUCCESS are deleted.
  • FailedExchangeEvents - Visibility events for the exchanges that completed with errors. Exchanges that reach a terminal state with a status of ERROR are deleted.
  • InProgressExchangeEvents - Visibility events for the exchanges that are not yet complete. Exchanges that reach a terminal state with a status of RUNNING, PROCESSING, or RETRYING are deleted.
[-w <auditDataWriteLocation> ]
The location where auditable data is written for the event-related purge types (SuccessfulExchangeEvents, FailedExchangeEvents, and InProgressExchangeEvents).
  • If this location is defined as part of the purge schedule, data for auditable events is written to the location before the events are purged.
  • If this location is not defined as part of the purge schedule, data for auditable events is not written before the events are purged.
Important: When visibility events are purged, transaction ID of the visibility event to which the auditable data belongs, is saved within the exchangeId tag in the XML file.
[-a <olderThanAgeInDays>]
Purge items that are older than the number of days specified. Must be a positive number.
Restriction: The <olderThanAgeInDays> option is overridden by the data retention setting for messages that are present in pull destinations. Items are purged if the message is expired or if the message was pulled the maximum number of times (3). For more information, see Configuring an AS4 pull destination.
[-i <intervalInSecondsBetweenPurge>]
The time interval in seconds between purge job triggers. Must be a positive number.
[-s <startDateTime>]
The time when to start purging. This parameter must either be now or have the format MM/DD/YYYY.hh:mm:ss:
MM
Month (01-12)
DD
Day of month (01-31)
YYYY
4-digit year
hh
Hour (00-23)
mm
Minute of the hour (00-59)
ss
Second of the minute (00-59)
If a date and time is provided, it must be a date and time in the future by at least 10 minutes from current time. For example, if you schedule a purge to run every 5 minutes, the start time you specify must be at least 10 minutes in the future. If you specify now, the system knows to start at least 10 minutes from the current time.
[-n <numRecordsPerBatch>]
The number of records to purge per batch. Must be a positive number.
[-m <maxNumRecordsPerPurgeCycle>]
The number of records to purge per partition. Must be a positive number or -1 (unlimited).
[-d <retentionDepth>]
The most recent number of records to retain for a member. All other records are purged. This option must be a positive number.

Examples

Example: Setting a purge schedule for a particular map.
This command sets the schedule for purging ProcessStateLogMap data at anything older than 12 days, with a 300-second interval between purges, starting now, purging 200 records per batch and an unlimited number per partition:
execute purge set ProcessStateLogMap -a 12 -i 300 -s now -n 200 -m -1
Example: Setting a purge schedule for a particular map by saving audit data.
This command sets the schedule for purging SuccessfulExchangeEvents data and saves audit data to C:\B2BAC_auditable_data:
execute purge set SuccessfulExchangeEvents
Executing purge set command.  Please wait this may take a moment...
Please provide the number of seconds to wait between runs of purge (Hit <Enter> for default of 86,400 seconds):

Please provide the start time for purge schedule. (Provide value of now or date time in format MM/dd/yyyy.HH:mm:ss or hit <Enter> for default of now):

Please provide a number for the age of the data in days that should be purged (Hit <Enter> for default of 30 days):

Please provide the number of records to purge in a batch (Hit <Enter> for default of 10,000 records):

Please provide the maximum number of records to purge each run (Hit <Enter> for default of -1 for unlimited):

Would you like to write audit data to a different location before purging? (Yes or No): y
Invalid response
Would you like to write audit data to a different location before purging? (Yes or No): Yes
Please provide the location to write audit data to: C:\B2BAC_auditable_data
Purge schedule was successfully set.