This page describes the configuration properties of the CDR resource adaptor. These properties are passed to the createRAEntity management operation when deploying the CDR resource adaptor.

Configuration properties

The following properties are passed to the createRAEntity management operation when deploying the CDR resource adaptor.

Property What it does Default

Directory

Name of the directory into which the CDRs will be written. The resource adaptor must have write permissions for it. This parameter is mandatory.

Note
See also
This property supports Property Expansion.
Warning

Changing this value will require adding a new FilePermission to the deployed unit. This can be done using REM.

In a clustered environment, each node manages its own set of CDR files. SBBs will write CDRs to the CDR file of whichever node they are executing on. Several nodes may safely write to the same output directory; but care should be taken to ensure that the final output filenames do not collide. Including a %n escape sequence (node ID) as part of the FilenamePattern is the simplest way to ensure this.

${rhino.dir.home}${/}cdr

CdrFileType

The CDR file type to use. Either Text or Binary.

Binary

FilenamePattern

Pattern used to generate final CDR filenames.

Note
See also
This property supports Property Expansion and Filename Patterns.

cdr_%n_%t.log

TempFilePrefix

Prefix used as part of the temporary CDR filename. That is, the file to which currently generated call data records are written.

Note
See also
This property supports Property Expansion.

cdr_

MaxSize

Approximate maximum size in bytes before a new CDR file is started. After a CDR is written, the total file size is compared to MaxSize.

  • If the current file size is larger, it is completed.

  • If MaxSize is 0, no size-based rollover is done.

1,000,000
bytes (approx 1MB)

MaxLines

Number of CDRs to be written to a CDR file before a new file is started. The line count does not include the header and footer lines, if enabled.

  • If MaxLines is 0, no size-based rollover is done.

0
(no rollover)

MaxInterval

Number of milliseconds of operation before time-based file rollover. If a CDR file is used for more than MaxInterval seconds without being rolled over due to line- or size-based limits, it is completed anyway.

Note If CreateEmptyFiles is True, at least one CDR file is created every MaxInterval seconds, even if no CDRs are written.

0
(no rollover)

Header

If True, a one-line header containing the start time of the CDR file is put at the start of each file.

True

Footer

If True, a one-line footer containing the end time of the CDR file is put at the end of each file.

True

CreateEmptyFiles

If True, a new CDR file is created immediately on resource adaptor activation, and whenever a CDR file is rolled over.

If False, a new file is created when writing the first CDR record after activation or roll over of a CDR file.

False

ArchiveCommand

Command to run on each CDR file completion. The resource adaptor must have execute permissions for the designated command.

{0} in the command line denotes the absolute path to the CDR file.

If empty, no command is run.

Note
See also
This property supports Property Expansion.

empty

Encoding

Character encoding to use for the output file.

ISO-8859-1

WriteTimeout

Time, in milliseconds, to wait for a CDR write to complete before returning a timeout error to the calling SBB.

5000
(5 seconds)

WriteRetry

Delay, in milliseconds, to wait after a CDR write error before attempting another CDR write.

30000
(30 seconds)

WriteWait

If True, the resource adaptor waits until the CDR is written to file before reporting success to the calling SBB.

If False, the resource adaptor adds the CDR to a queue and returns immediately. This can be used to reduce latency in writing CDRs, but means that queued CDRs are lost in the event of a write error or node failure.

Warning If this property is set to False, then WriteSync should generally also be set to False, because the resource adaptor will already have returned to the calling SBB before FileDescriptor.sync() is called.

True

WriteSync

If True, FileDescriptor.sync() is called after writing CDRs, to flush them to disk before reporting success to the calling SBB.

If False, the call to sync() is skipped, resulting in considerably less disk I/O but a weaker guarantee to the calling SBB.

Warning If WriteWait is False, then this value has no effect on when control is returned to the calling SBB.

True

Filename patterns

The FilenamePattern configuration parameter should include escape sequences that are replaced to generate unique filenames. The supported sequences are:

Sequence Description

%%

A literal '%' character

%t

File completion timestamp, as milliseconds since Jan 1 1970 00:00 UTC

%T

File creation timestamp, as milliseconds since Jan 1 1970 00:00 UTC

%s

Auto-incrementing file sequence number, starting at 1

%d

File completion timestamp, formatted as YYYYMMDDhhmmss

%D

File creation timestamp, formatted as YYYYMMDDhhmmss

%n

Rhino node ID responsible for creating this file

Property expansion

Certain CDR resource adaptor configuration properties support system property expansion. This mechanism is similar to expanding variables in a shell. That is, when a string like: ${some.property} appears as part of a configuration property value, it will be expanded to the value of the system property. For example,

${user.home}/cdr

will expand ${user.home} to use the value of the user.home system property. If that property’s value is /home/cathy, then the above is equivalent to

/home/cathy/cdr

In order to assist in platform-independent configuration, you can also use the special notation of ${/}, which is a shortcut for ${file.separator}.

Persistence, error handling, and operational state

If both WriteWait and WriteSync configuration properties are set to True, the CDR resource adaptor ensures that all written CDR data has been flushed to disk (using java.io.FileDescriptor.sync()) before returning to a SBB. In that case, after a successful writeCDR call, SBBs should assume that all CDR data has been saved to disk.

If there is a write error while writing the CDR, and the WriteWait configuration property is True, this will be reported to the SBB as an IOException. If the CDR could not be written within the configured WriteTimeout of the RA entity, com.opencloud.slee.resources.cdr.WriteTimeoutException (a subclass of IOException) is reported to the SBB.

Note In general, receiving an exception means that the CDR RA could not guarantee that the CDR was successfully written. (It might eventually be written successfully, but there is no guarantee.)

Under normal operation, CDRProvider.isOperational() returns True. If a write error or timeout error occurred recently, isOperational() returns False and all attempts to write CDRs are immediately rejected without attempting to write them to disk. This state persists for 2*WriteTimeout milliseconds (for timeout errors) or WriteRetry milliseconds (for write errors). Additionally, isOperational() returns False if the RA entity is currently deactivated. Services should test isOperational() if they wish to behave differently when CDR writing is unavailable due to error.

In the event of a write error, or if a Rhino node unexpectedly exits, partial CDR files may be left in the CDR directory. With the default configuration value of TempFilePrefix, these files are named cdr_nodeID_*.tmp where * denotes a random number. If they contain useful CDR data, these files will need to be manually examined and processed.

Previous page Next page