DETS files
The CDR recordsOpens in a new tab are stored in DETSOpens in a new tab files. These files are moved from the receiver to S3Opens in a new tab. The sender moves these files from S3 and sends the CDR records in them. When a CDR has been sent, it is stored in another DETS file, which is eventually (when sufficiently full) archived in S3.
Moving files to S3 is done in two steps:
- CDF downloads a file to the local disk and saves this copy under a temporary name.
- When copying is complete, the original is deleted.
Moving files from S3 is done in three steps:
- CDF creates a local file copy by uploading file content that has been compressed, to a temporary file with a matching name.
- When copying is complete, it is renamed with the target name.
- When that action is successful, the original is deleted. In the case of a failure, CDF tries again.
This diagram presents the detailed data flow of CDF:
The receiver receives ACR records from Rf (DIAMETER).
ACRs are saved as CDRs in DETS files on disk. You can configure the directory in the
values.yamlfile:yamlExample:
file:///data/2011-12-13/aname/20000.detsAfter a configurable time, the DETS file is closed and moved to a staging area. Example:
file:///data/2011-12-13/aname/to_sender/20000.detsFiles in the staging area are moved to S3, in a configurable bucket. Example:
s3://s3bucket/2011-12-13/aname/to_sender/20000.detsIf it is not possible to move files to S3, they stay on the disk until it is possible.
The sender searches for files in S3. The search starts with oldest date first and only switches to the next date after all files in the
to_sender/directory are sent. Only the configured directories are searched. You can configure the directories in thevalues.yamlfile:yamlExample:
s3://s3bucket/2011-12-13/aname/to_sender/20000.detsThe sender moves files from S3 to the disk. No more than two files at a time are stored on the disk in the
to_sender/directory. File20002.detsis only moved from S3 after20000.detsis gone, meaning that all records are sent. Example:file:///data/2011-12-13/aname/to_sender/20002.detsThe sender reads the CDRs from the file. Example:
file:///data/2011-12-13/aname/10000.detsThe sender sends the CDRs.
The sender stores the record in a new DETS file.
The sender deletes the record from the old file.
When the new DETS file is full, it is closed and moved to a staging area. Example:
file:///data/2011-12-13/aname/to_archive/10000.detsFiles in the staging area are moved to S3 in a configurable bucket. Example:
s3://s3bucket/2011-12-13/aname/to_archive/10000.dets
If it is not possible to move files to/from S3 they stay on the disk until it is possible.