EDPS Engineering Data Receipt (EDR) Pipeline Reference Manual
Contents
EDR Pipeline Overview
The need for an EDR Pipeline
The EDR Pipeline is the Pipeline within the EDPS that is responsible for receiving and decompressing
compressed FOF Engineering Telemetry files sent from the HST Control Center System (CCS). This
decompression is performed to get the FOF files into a format that enables them to be processed by the
EDPS FOF Conversion pipeline.
Intended Audience and Scope
This Reference Manual is intended primarily to give OPUS Operations Personnel
information needed to understand the operation of the EDPS EDR Pipeline.
This includes information on the EDR Pipeline Input and Output products, the
directories and files used, and the processes involved. Hopefully, as envisioned, this
manual will be a dynamic document that is updated when EDR Pipeline changes are made.
EDR Pipeline Dependencies
The EDR pipeline is one of two EDPS pipelines that is not dependent upon other EDPS pipelines to function
correctly; the EDPS PASS Data Receipt (PDR) Pipeline being the other one. The EDR and PDR pipelines however
are dependent upon systems outside of the EDPS. The EDR pipeline is dependent upon the HST Control Center
System (CCS) to provide notification that HST Engineering Telemetry data is available for processing and to
provide the Engineering telemetry itself.
Also, the EDR Pipeline and the OPUS EDPS in general for that matter are highly dependent upon
database interaction; see EDR Pipeline Database Usage. In order for the
EDR pipeline database interaction to occur correctly, the processes in the pipeline should be
executed in a pipeline mode as opposed to an interactive mode. Typically, as specified by the
OK_TO_UPDATE_DATABASE mnemonic in process resource files, processes that run in interactive mode
are prohibited from performing database updates. Therefore, to ensure correct operation of the pipeline,
!!! ALL EDR PIPELINE PROCESSES SHOULD BE RUN ONLY IN THE PIPELINE MODE !!!.
EDR Pipeline Nominal Operational Description
The EDR pipeline remains idle until it receives Product Notification Message (PNM) files from the CCS.
The PNM files contain lists of all the FOF files currently ready to be processed by the EDPS. To insure
that the EDR pipeline does not try to access a FOF file before it is available on disk, the CCS transfers
all the FOF files listed in a PNM file prior to sending the PNM file to the EDR pipeline.
When a PNM file is received, the EDR pipeline performs database queries to determine if the PNM file is
a duplicate; i.e., if the PNM file had been previously received or if it listed FOF files that had been
previously received. If the PNM file is a duplicate, it will be renamed as such and a 'pnm' class OSF
will be created that aslo indicates that the PNM file is a duplicate. Duplicate PNM files will not be
processed by the EDR pipeline without manual intervention from an operator. This manual intervention
is described in the PNMFOF Process Description section later in this document.
When a PNM file is not a duplicate, the EDR pipeline creates a 'pnm' class OSF for the PNM file and
'fof' class OSFs for each FOF file listed in the PNM file. The pipeline also inserts information
into the database to indicate what PNM files have been received and what FOF files are listed in each
PNM file. The EDR pipeline then verifies that each FOF file listed in a given PNM file exists on disk.
After it verifications succeed, the EDR pipeline decompresses each FOF file to get it into a form useable
by the EDPS FOF Conversion pipeline. As it is decompressing the FOF files, the EDR pipeline updates the
database to keep track of which FOF files have been decompressed. Once all the FOF files listed in a PNM
file have been decompressed, the PNM file and its corresponding OSF as well as the OSFs for each decompressed
FOF file are deleted as they are no longer needed. When the EDR pipeline if finished processing a given
PNM file, the decompressed versions of each FOF file listed in the PNM file will be on disk and be ready
to be processed by the EDPS FOF Conversion pipeline.
EDR Pipeline Directories and Files
- OPUS_HOME_DIR
contains EDR Process Status Files (PSFs) and Process Log Files
- OPUS_HOME_DIR_LOCK
contains transient Lock Files used to avoid PSF collisions
- OPUS_OBSERVATIONS_DIR
contains EDR Observation Status Files (OSFs)
- OPUS_OBSERVATIONS_DIR_LOCK
contains transient Lock Files used to avoid OSF collisions
- OPUS_DEFINITIONS_DIR
contains Path files, Stage Files, Process Resource Files, OPUS Manager Data Files, and other configuration
related files:
edr.path_template - defines directory mnemonics used by the EDR Pipeline.
Also defines mnemonics such as OPUS_DB, DSQUERY, and OK_TO_UPDATE_DATABASE for database access
null.path - defines directory mnemonics used by EDR processes when they are
being executed in an interactive mode.
edr_pipeline.stage - defines the 4 stages in the EDR Pipeline; the processes
that execute within each stage; and the possible status values for each stage
- PN - Engineering Telemetry File Notification Stage
- ZI - Engineering Telemetry File Decompression Stage
- CL - PNM file delete Stage
- DL - OSF delete Stage
PNMFOF.RESOURCE - defines characteristics of the PNMFOF Process
ZIPFOF.RESOURCE - defines characteristics of the ZIPFOF Process
CLNFOF.RESOURCE - defines characteristics of the CLNFOF Process
EDRDEL.RESOURCE - defines characteristics of the EDRDEL Process
pmg_restrictions.dat - used to restrict the number of copies of certain processes that
the PMG is allowed to start up
opus.env - contains user-configurable parameters that establish the format of PSTAT and
OSF blackboard entries, which blackboard implementation to use, and the directory in which PSTAT
entries are stored for FILE blackboard implementations
opus_corba_objs - contains information needed when a CORBA Blackboard implementation is
being used for interprocess communication between the OPUS Managers and the processes in a pipeline
EDR_RECEIPT_DIR
contains Product Notification Message (PNM) files and compressed Engineering Telemetry (FOF) files
received from CCS
- pnm_yyydddhhmmss.txt - Naming Convention of PNM files received from CCS
- pnm_yyydddhhmmss.txt_proc - Naming Convention of PNM files as they are being processed
by PNMFOF
- pnm_yyydddhhmmss.txt_done - Naming Convention of PNM files after they have been
successfully processed by PNMFOF
- pnm_yyydddhhmmss.txt_bad - Naming Convention of PNM files if PNMFOF encountered an error
while processing them
- pnm_yyydddhhmmss.txt_duplicate - Naming Convention of PNM files that have been determined
to be duplicates of previously received PNM files
- tyyyydddhhmm.mrg-gz - Naming Convention of compressed FOF files received from CCS before
the files have been moved to the EDR_FOF_DIR by the PNMFOF process
EDR_FOF_DIR
contains compressed and decompressed FOF files
- tyyyydddhhmm.mrg-gz - Naming Convention of compressed FOF files moved to this directory
by the PNMFOF process
- tyyyydddhhmm.mrg - Naming Convention of FOF files while they are being decompressed by
the ZIPFOF process
- tyyyydddhhmm.fof - Naming Convention of decompressed FOF files renamed by the ZIPFOF
process to make them recognizeable to the EDPS FOF pipeline
EDR Pipeline Processes
EDR Pipeline Processes Overview
The EDR Pipeline is composed of the following 4 processes:
- PNMFOF - polls the EDR_RECEIPT_DIR directory
for Product Notification Message (PNM) files from the CCS system and creates 'pnm' class OSfs for each
PNM file and 'fof' class OSFs for each FOF file listed in each PNM file.
- ZIPFOF - unzips, i.e., decompresses the compressed FOF files in the
EDR_FOF_DIR directory using the 'gzip' command.
- CLNFOF - deletes PNM files that have had all of their associated FOF file
decompressed. Also, deletes PNM files determined to be duplicates as well as deleting all of the
FOF file associated with the duplicate PNM files.
- EDRDEL - deletes 'pnm' class and 'fof' class OSFs after EDR pipeline
processing has successfully completed.
EDR Pipeline Processes Details
PNMFOF Process details
- PNMFOF Process Description
- This process resides in the (PN) stage of the EDR Pipeline. It
is a nominally a file triggerred process and its purpose is to poll the EDR_RECEIPT_DIR
directory for Product Notification Message (PNM) files from the CCS system. Once a PNM file is received,
PNMFOF will either use an existing OSF for the PNM file or create a new OSF if one does not exist. PNMFOF
will then check the database pnmfof_table relation to determine if the PNM file
is a duplicate; i.e., whether the PNM file has the same name and notification date as a previously received
PNM file or whether the PNM file contains a previously received FOF file. If a PNM file is a duplicate, its
OSF will be set to indicate such and the PNM file will not be processed. If the PNM is not a duplicate, its
OSF will be set so that the PNM file will be processed. PNMFOF will then verify that all of the FOF files
listed in the PNM exist in the EDR_RECEIPT_DIR directory and a record will be
inserted into the pnmfof_table relation for each FOF file. Lastly, a 'fof' class
OSF is created for each FOF file and each FOF file is moved from the EDR_RECEIPT_DIR
directory to the EDR_FOF_DIR directory to be decompressed by the ZIPFOF
process.
If a PNM file is determined to be a duplicate, The PNMFOF process provides the capability to "shove"
the PNM file thru the EDR pipeline; i.e, to process the PNM file anyway. This capability requires manual
intervention by the pipeline operator. To "shove" a duplicate PNM file thru, an 's' is manually inserted
into the PN Stage of the 'pnm' class OSF for the duplictae PNM file. If this is done, the duplicate PNM
file will be treated as though it is not a duplicate and will be processed as normal. When the "shove"
capability is used, PNMFOF becomes an OSF triggerred process.
- PNMFOF Process Triggers
Input Trigger:
PNMFOF is a file poller process that is triggerred by the appearance of PNM files
(pnm_yyydddhhmmss.txt) in the EDR_RECEIPT_DIR directory
Output Triggers:
PNMFOF triggers the CLNFOF process to wait to delete PNM files until after all FOF files in the
PNM files have been decompressed
PN ZI CL DL Class
-- -- -- -- -----
c n v _ pnm
PNMFOF triggers the ZIPFOF Process
PN ZI CL DL Class
-- -- -- -- -----
c w _ _ fof
For Duplicate PNM processing:
-----------------------------
to indicate a duplicate PNM file
PN ZI CL DL Class
-- -- -- -- -----
d n d _ pnm
manually insert an 's' in the PN stage to trigger PNMFOF to process a duplicate PNM file
PN ZI CL DL Class
-- -- -- -- -----
s n v _ pnm
PNMFOF Process I/O - Input to and Output from the PNMFOF process is as follows:
INPUT:
EDR_RECEIPT_DIR:
pnm_yyydddhhmmss.txt - PNM files received from CCS
tyyyydddhhmm.mrg-gz - compressed FOF Telemetry Files received from CCS
OUTPUT:
OPUS_OBSERVATIONS_DIR:
'pnm' class OSF's for FOF PNM files
'fof' class OSF's for FOF Telemetry files
EDR_RECEIPT_DIR:
pnm_yyydddhhmmss.txt_proc - Naming Convention of PNM files as they are being processed
by PNMFOF
pnm_yyydddhhmmss.txt_done - Naming Convention of PNM files after they have been
successfully processed by PNMFOF
pnm_yyydddhhmmss.txt_bad - Naming Convention of PNM files if PNMFOF encountered an error
while processing them
pnm_yyydddhhmmss.txt_duplicate - Naming Convention of PNM files that have been determined
to be duplicates of previously received PNM files
EDR_FOF_DIR:
tyyyyddhhmm.mrg-gz - FOF Telemetry files moved here from EDR_RECEIPT_DIR
PNMFOF Process Modes - The PNMFOF process needs to make database inserts/updates and thus
should be run only in the pipeline mode as Interactive mode typically prevents databse inserts/updates.
Pipeline Mode:
pnmfof -p opus_definitions_dir:your.path -r pnmfof (in task line of resource file)
where:
-p = denotes path file specification follows
-r = denotes resource file for the PNMFOF Process
opus_definitions_dir:your.path = path file to use
PNMFOF Process Resource File
!--------------------------------------------------------------------
!
! PNMFOF RESOURCE FILE
!
! This file is used to construct the trigger, error, and success status
! fields in the observation status file.
!
!---------------------------------------------------------------------
! REVISION HISTORY
!---------------------------------------------------------------------
! MOD PR
! LEVEL DATE NUMBER User Description
! ----- -------- ------ ------ --------------------------------------
! 000 05/29/98 36120 Ken S. Created
! 001 01/20/99 37507 Ken S. Process duplicate PNM files.
! 002 01/20/00 39109 Ken S. Set wait status for PNM osf when complete.
! 003 02/04/00 39164 Ken S. Implement shove option for duplicate data.
! 004 12/01/00 42449 Ken S. Accomodate CCS pushing FOF data.
! 005 10/24/01 44684 Goldst Standardized OPUS EDR pipeline version
! 006 01/30/02 45016 Goldst Corrected OK_TO_UPDATE_DATABASE
! 007 03/11/02 45016 Goldst Added OSF_TRIGGER1.DATA_ID
! 008 03/14/02 45016 Goldst Added FOF_DATA_ID
! 009 03/27/02 45016 Goldst Added "DANGLE" to keywords
! 010 03/29/02 45016 Goldst Changed per new requirement
! 011 04/04/02 45382 Goldst Removed LOG* keywords
! 012 04/08/02 45382 Goldst Added two new keywords
! 013 04/24/02 45016 Goldst Change "_" status to "©" character
! 014 07/18/02 46157 J.Baum Add file trigger for transferred files, add
! PNM_TEST_PNM state.
!---------------------------------------------------------------------
PROCESS_NAME = pnmfof
TASK = <pnmfof -p $PATH_FILE -r pnmfof>
DESCRIPTION = 'Product notification message poller'
SYSTEM = EDR
CLASS = pnm
DISPLAY_ORDER = 1
OK_TO_UPDATE_DATABASE = OK_TO_UPDATE_DATABASE ! Determined by path file
INTERNAL_POLLING_PROCESS = TRUE
FILE_RANK = 1 ! First Trigger
FILE_OBJECT1 = *.txt ! File specification for polling
FILE_DIRECTORY1 = EDR_RECEIPT_DIR !
FILE_OBJECT2 = *.txt_xfr ! Alternate file specification
FILE_DIRECTORY2 = EDR_RECEIPT_DIR !
FILE_PROCESSING.DANGLE = _proc ! Extension addition during processing
FILE_SUCCESS.DANGLE = _done ! Extension addition if normal processing
FILE_ERROR.DANGLE = _bad ! Extension addition if error
FILE_DUPLICATE.DANGLE = _duplicate ! Extension addition if duplicate
OSF_RANK = 2 ! Second Trigger
OSF_TRIGGER1.PN = s ! OSF being shoved through
OSF_TRIGGER1.DATA_ID = pnm ! Trigger class ID
OSF_PROCESSING.PN = p ! Set the processing flag to 'Processing'
!PNM Success
PNM_CREATE.PN = p !PNM file create status
PNM_COMPLETE.PN = c !PNM file complete status
PNM_COMPLETE.ZI = n !Not applicable to PNM processing
PNM_COMPLETE.CL = v !PNM vaiting for cleanup (set by CLNFOF)
PNM_TEST_PNM.PN = c !PNM - test file complete
PNM_TEST_PNM.ZI = n !PNM - no zipping
PNM_TEST_PNM.CL = w !PNM - test file ready for deletion
PNM_DUPLICATE.PN = d !PNM file duplicate status
PNM_DUPLICATE.ZI = n !PNM file duplicate status
PNM_DUPLICATE.CL = d !PNM file duplicate status
!############ DO NOT CHANGE THIS STATUS VALUE ######################
PNM_DUPLICATE.DL = © !Reset to "_" for PNM file duplicate status
!####################################################################
PNM_FAIL.PN = f !PNM file failed status
FOF_COMPLETE.PN = c !FOF file complete status
FOF_COMPLETE.ZI = w !Reset for duplicate FOF processing
!############ DO NOT CHANGE THESE STATUS VALUES #####################
FOF_COMPLETE.CL = © !Reset to "_" for duplicate FOF processing
FOF_COMPLETE.DL = © !Reset to "_" for duplicate FOF processing
!#####################################################################
POLLING_TIME = 10 ! Wait (seconds) before polling for next
PNMPATH = EDR_RECEIPT_DIR ! Find Product notificatiuon messages(PNM) here
OUTPATH = EDR_FOF_DIR ! Move zipped FOF data here
MINBLOCKS = 50000 ! blocks required on output disk
ZIPPED_EXT = .mrg-gz ! Zipped file extension
FOF_DATA_ID = fof ! Data ID for fof class OSFs
! forces values from path to be used
ENV.OPUS_DB = OPUS_DB
ENV.DSQUERY = DSQUERY
PNMFOF Process accessed database relations
PNMFOF accessed Relations
PNMFOF Process database queries
PNMFOF Process Queries
ZIPFOF Process details
- ZIPFOF Process Description
- This process resides in the (ZI) stage of the EDR Pipeline. It
is a 'fof' class OSF triggered process and its purpose is to unzip, i.e., decompress the compressed FOF
files received from CCS to enable them to be processed by the EDPS FOF Conversion pipeline. The files
to be decompressed reside in the EDR_FOF_DIR directory.
- ZIPFOF Process Triggers
Input Trigger:
ZIPFOF is triggerred by the PNMFOF Process
PN ZI CL DL Class
-- -- -- -- -----
c w _ _ fof
Output Trigger:
ZIPFOF triggers the CLNFOF Process
PN ZI CL DL Class
-- -- -- -- -----
c c w _ fof
ZIPFOF Process I/O - Input to and Output from the ZIPFOF process is as follows:
INPUT:
EDR_FOF_DIR:
tyyyydddhhmm.mrg-gz - compressed FOF files
OUTPUT:
EDR_FOF_DIR:
tyyyydddhhmm.mrg - name of decompressed FOF files while the decompression is occurring
tyyyydddhhmm.fof - name of decompressed FOF files after the decompression is complete
ZIPFOF Process Modes - The ZIPFOF process should be executed in a pipeline mode only. However
decompressing a FOF file interactively from a command line can be done by using the gzip command as
indicated below:
using gzip interactively from command line:
gzip -d <filename>
example: gzip -d tyyyydddhhmm.mrg-gz
Pipeline Mode:
zipfof -p opus_definitions_dir:your.path -r zipfof (in task line of resource file)
where:
-p = denotes path file specification follows
-r = denotes resource file for the ZIPFOF Process
opus_definitions_dir:your.path = path file to use
ZIPFOF Process Resource File
!--------------------------------------------------------------------
!
! ZIPFOF RESOURCE FILE
!
!
! This file is used to construct the trigger, error, and success status
! fields in the observation status file.
!
!
!-----------------------------------------------------------------------
! REVISION HISTORY
!-----------------------------------------------------------------------
! MOD PR
! LEVEL DATE NUMBER User Description
! ----- -------- ------ ------ -------------------------------------
! 000 05/29/98 36120 Ken S. Created
! 001 11/03/99 39667 JSCHULTZ add OUTPATH and MINBLOCKS mnemonics
! 002 11/10/99 39598 JSCHULTZ delete FOFPATH mnemonic (OUTPATH now used)
! 003 12/01/00 42449 Ken S. Accomodate CCS pushing FOF data.
! 004 10/24/01 44684 Goldst Standardized OPUS EDR pipeline version
! 005 01/30/02 45016 Goldst Corrected OK_TO_UPDATE_DATABASE
! Added ENV.OPUS_DB, etc.
! 006 03/11/02 45016 Goldst Added OSF_TRIGGER1.DATA_ID
!-----------------------------------------------------------------------
PROCESS_NAME = zipfof
TASK = <zipfof -p $PATH_FILE -r zipfof>
DESCRIPTION = 'Unzip files from CCS'
SYSTEM = EDR
CLASS = fof
DISPLAY_ORDER = 1
OK_TO_UPDATE_DATABASE = OK_TO_UPDATE_DATABASE ! Determined by path file
INTERNAL_POLLING_PROCESS = TRUE
OSF_RANK = 1 ! First Trigger
OSF_TRIGGER1.PN = c ! OSF complete status
OSF_TRIGGER1.ZI = w ! OSF next-step status
OSF_TRIGGER1.DATA_ID = fof ! Trigger class ID
OSF_PROCESSING.ZI = p ! OSF processing status
FOF_COMPLETE.ZI = c ! FOF complete status
FOF_COMPLETE.CL = w ! FOF next-step status
FOF_FAIL.ZI = f ! OSF failed status
POLLING_TIME = 10 ! Wait (seconds) before polling for next
OUTPATH = EDR_FOF_DIR ! Directory containing unzipped FOF files
MINBLOCKS = 400000 ! minimum blocks required on OUTPATH
UNZIPPED_EXT = .mrg ! Unzipped file extension
DONE_EXT = .fof ! Completed file
ZIPPED_EXT = .mrg-gz ! Zipped file extension
SWITCHES = '-d -v' ! gzip command switches
! forces values from path to be used
ENV.OPUS_DB = OPUS_DB
ENV.SPSS_DB = SPSS_DB
CLNFOF Process details
- CLNFOF Process Description
- This process resides in the (CL) stage of the EDR Pipeline. It
is a 'pnm' and 'fof' class OSF triggered process. When triggerred by a 'pnm' class OSF, CLNFOF deletes
the associated PNM file and sets the 'pnm' OSF to 'c' in the (DL) stage to enable deletion of the 'pnm'
OSF. This senario occurs when CLNFOF had initially been triggerred by a 'fof' class OSF and has determined that
all the FOF files listed in a PNM file have been decompressed and have had their fof_complete_date field in the
pnmfof_table relation set. When triggerred by a 'fof' class OSF, CLNFOF updates the
fof_complete_date field of the pnmfof_table relation to indicate that the given FOF file
has been decompressed and it puts a 'c' in the (DL) stage of the 'fof' class OSF for the FOF file so that the 'fof'
class OSF can be deleted.
Also, if a PNM file had been determined by the PNMFOF process to be a duplicate, CLNFOF can be manually
triggerred to delete the duplicate PNM file and all of the the FOF files listed in the PNM file. This is
done by manually inserting an 's' into the (CL) stage of the 'pnm' class OSF for the duplicate PNM file.
In this scenario, the 'pnm' class OSF along with all of its associated 'fof' class OSFs will also be deleted.
- CLNFOF Process Triggers
Input Triggers:
CLNFOF is triggerred by the the ZIPFOF Process for 'fof' class OSFs
PN ZI CL DL Class
-- -- -- -- -----
c c w _ fof
CLNFOF re-triggers itself for 'pnm' class OSFs
(after initially being triggerred for a 'fof' class OSF by the zipfof process, if CLNFOF determines
that all FOF files in a given PNM file have been decompressed, CLNFOF will trigger itself by inserting
a 'w' into the CL stage for the associated PNM file)
PN ZI CL DL Class
-- -- -- -- -----
c n w _ pnm
CLNFOF can be manually triggerred by inserting an 's' into the CL stage for a given 'pnm' class OSF
(this will result in the deletion of the given PNM file and all of the FOF files listed in the
PNM file)
PN ZI CL DL Class
-- -- -- -- -----
c n s _ pnm
Output Triggers:
CLNFOF triggers the EDRDEL process for 'fof' class OSFs
PN ZI CL DL Class
-- -- -- -- -----
c c c c fof
CLNFOF triggers the EDRDEL process for 'pnm' class OSFs
PN ZI CL DL Class
-- -- -- -- -----
c n c c fof
CLNFOF Process I/O - Input to and Output from the CLNFOF process is as follows:
INPUT:
EDR_RECEIPT_DIR:
pnm_yyydddhhmmss.txt_done - successfully processed PNM files to delete
pnm_yyydddhhmmss.txt_duplicate - duplicate PNM files to delete
tyyyyddhhmm.mrg-gz - FOF files contained in duplicate PNM files to delete
OUTPUT:
N/A
CLNFOF Process Modes - The CLNFOF process needs to make database updates and thus
should be run only in the pipeline mode as Interactive mode typically prevents databseupdates.
Pipeline Mode:
clnfof -p opus_definitions_dir:your.path -r clnfof (in task line of resource file)
where:
-p = denotes path file specification follows
-r = denotes resource file for the CLNFOF Process
opus_definitions_dir:your.path = path file to use
CLNFOF Process Resource File
!--------------------------------------------------------------------
!
! CLNFOF RESOURCE FILE
!
! This file is used to construct the trigger, error, and success status
! fields in the observation status file.
!
!------------------------------------------------------------------------
! REVISION HISTORY
!------------------------------------------------------------------------
! MOD PR
! LEVEL DATE NUMBER User Description
! ----- -------- ------ ------ --------------------------------------
! 000 05/29/98 36120 Ken S. Created
! 001 01/20/99 37507 Ken S. Process duplicate PNM files.
! 002 11/01/99 39597 JSCHULTZ add LOGPATH mnemonic
! 003 01/20/00 39109 Ken S. Add wait status.
! 004 10/24/01 44684 Goldst Standardized OPUS EDR pipeline version
! 005 01/30/02 45016 Goldst Corrected OK_TO_UPDATE_DATABASE
! 006 03/11/02 45016 Goldst Added OSF_TRIGGER1 and 2.DATA_ID
! 007 03/15/02 45016 Goldst Corrected PNM 2.DATA_ID (to pnm)
! 008 03/29/02 45016 Goldst Changed per new requirements
! 009 04/02/02 45016 Goldst Added FILE_DUPLICATE, FILE_DONE and
! EXTENSION
!------------------------------------------------------------------------
PROCESS_NAME = clnfof
TASK = <clnfof -p $PATH_FILE -r clnfof>
DESCRIPTION = 'CLEANS files transfered from CCS'
SYSTEM = EDR
CLASS = all
DISPLAY_ORDER = 1
OK_TO_UPDATE_DATABASE = OK_TO_UPDATE_DATABASE ! Determined by path file
INTERNAL_POLLING_PROCESS = TRUE
OSF_RANK = 1 ! First Trigger FOF
OSF_TRIGGER1.PN = c ! OSF complete status
OSF_TRIGGER1.ZI = c ! OSF complete status
OSF_TRIGGER1.CL = w ! OSF next-step status
OSF_TRIGGER1.DATA_ID = fof ! Trigger1 class ID
OSF_RANK = 2 ! Second Trigger PNM
OSF_TRIGGER2.PN = c ! OSF complete status
OSF_TRIGGER2.ZI = n ! Not applicable to PNM processing
OSF_TRIGGER2.CL = w ! OSF next-step status
OSF_TRIGGER2.DATA_ID = pnm ! Trigger2 class ID
OSF_RANK = 3 ! Third Trigger Clean duplicate files
OSF_TRIGGER3.CL = s ! Trigger for file deletion
OSF_TRIGGER3.DATA_ID = pnm ! Trigger3 class ID
OSF_PROCESSING.CL = p ! Set the processing flag to 'Processing'
FOF_COMPLETE.CL = c ! FOF Complete status
FOF_COMPLETE.DL = c ! FOF trigger for osf deletion
FOF_FAIL.CL = f ! FOF failed status
PNM_WAIT.CL = w ! PNM wait status
PNM_COMPLETE.CL = c ! PNM completion status
PNM_COMPLETE.DL = c ! PNM trigger for osf deletion
PNM_FAIL.CL = f ! PNM failed status
FILE_DUPLICATE = _duplicate ! For building name of file to delete
FILE_DONE = _done ! "
EXTENSION = .txt ! "
POLLING_TIME = 10 ! Wait (seconds) before polling for next
PNMPATH = EDR_RECEIPT_DIR ! Directory of input files
CLNFOF Process accessed database relations
CLNFOF accessed Relations
CLNFOF Process database queries
CLNFOF Process Queries
EDRDEL Process Description - This process resides in the (DL) stage of the EDR Pipeline. It
is an OSF triggered process and its purpose is to delete 'pnm' and 'fof' class OSFs from the pipeline after
their associated processing has completed. EDRDEL is triggerred by a 'c' in the (DL) stage of an OSF. When
EDRDEL is triggerred, it looks in its resource file to determine which OSFs to delete. The following resource
file mnemonics are used in making the determination:
OSF_TRIGGER1.DL = c - value of (DL) stage that triggers EDRDEL
OSF_TRIGGER1.DATA_ID = pnm - class of OSF to delete
OSF_TRIGGER2.DL = c - value of (DL) stage that triggers EDRDEL
OSF_TRIGGER2.DATA_ID = fof - class of OSF to delete
EDRDEL Process Triggers
Input Triggers:
EDRDEL is triggerred by the the CLNFOF Process for 'pnm' class OSFs
PN ZI CL DL Class
-- -- -- -- -----
c n c c pnm
EDRDEL is triggerred by the the CLNFOF Process for 'fof' class OSFs
PN ZI CL DL Class
-- -- -- -- -----
c c c c fof
EDRDEL Process I/O - Input to and Output from the EDRDEL process is as follows:
INPUT:
OPUS_OBSERVATIONS_DIR:
'pnm' and 'fof' class OSFs to be deleted
OUTPUT:
N/A
EDRDEL Process Modes - The EDRDEL process invokes an OPUS pipeline generic executable to perform
its work; i.e., the 'osfdelete' executable. This executable can only be executed in a pipeline mode.
Pipeline Mode:
osfdelete -p opus_definitions_dir:your.path -r edrdel (in task line of resource file)
where:
-p = denotes path file specification follows
-r = denotes resource file for the EDRDEL Process
opus_definitions_dir:your.path = path file to use
EDRDEL Process Resource File
!--------------------------------------------------------------------
!
! edrdel.resource
!
! Purpose: This file is used to construct the trigger, error, and
! success status fields in the observation status file.
!
! This resource file uses an OSF trigger.
!
!--------------------------------------------------------------------
! REVISION HISTORY
!--------------------------------------------------------------------
! PR
! DATE NUMBER User Description
! ------ ------ ------- ------------------------------
! MOD PR
! LEVEL DATE NUMBER User Description
! ----- -------- ------ ------ -------------------------------------
! 000 10/24/01 44684 Goldst Created initial version
! 001 03/12/02 45016 Goldst Added TRIGGER2 and DATA_ID
!--------------------------------------------------------------------
PROCESS_NAME = edrdel
TASK = <osfdelete -p $PATH_FILE -r edrdel>
DESCRIPTION = 'Delete OSFs from the BB'
SYSTEM = EDR
CLASS = all
DISPLAY_ORDER = 1
!---------------------------------------------------------------------------
! EVNT resource.
!---------------------------------------------------------------------------
OSF_RANK = 1 ! OSF event ordering.
OSF_TRIGGER1.DL = c ! Archive completed will trigger OSF deletion
OSF_TRIGGER1.DATA_ID = pnm ! Trigger1 class ID
OSF_TRIGGER2.DL = c ! Archive completed will trigger OSF deletion
OSF_TRIGGER2.DATA_ID = fof ! Trigger2 class ID
POLLING_TIME = 5 ! Response time of the application
!---------------------------------------------------------------------------
! Application Specific resource
!---------------------------------------------------------------------------
OSF_PROCESSING.DL = p ! letter to be used when an OSF is processed.
OSF_ERROR.DL = e ! letter to be used when there is an error.
EDR Pipeline Database usage
Database Relations Accessed
PNMFOF Process accessed relations
CLNFOF Process accessed relations
Database Queries Performed
Database Relations accessed
pnmfof_table Relation
This relation is used to track the transfer and processing of FOF files designated by a
PNM (Product Notification Message) from CCS. It is used to indicate what FOF files are
contained within what PNM file; to determine if a given PNM file or FOF file had been
previously received; i.e., is a duplicate; and to determine when all of the FOF files
listed in a PNM file have been decompressed.
The EDR Pipeline PNMFOF process is the process that inserts new records
into this relation. PNMFOF provides values for all of the relations fields except the
fof_complete_date field as it is the EDR Pipeline CLNFOF process that
provides values for this field.
Field name type/size description
---------- --------- -----------
pnm_name C17 PNM file name
pnm_notification_date C22 PNM File notification Date in yyyy.ddd:hh:mm:ss.sss
pnm_receipt_date C22 PNM File receipt Date in yyyy.ddd:hh:mm:ss.sss
fof_name C15 FOF file name
fof_transfer_date C22 FOF File transfer Date in yyyy.ddd:hh:mm:ss.sss
fof_complete_date C22 FOF File competion Date in yyyy.ddd:hh:mm:ss.sss
product_eng_map Relation
This relation is used to identify the FOF engineering telemetry files that need to be converted to provide
intermediary telemetry files containing telemetry parameters needed for FGS, GSA or AST product generation.
It is used to simplify creation and collection of telemetry for processing. When a product has no
eng_ready = N flags, then the OSF for the product can be created using the product rootname.
The EDR Pipeline PNMFOF process uses this relation to indicate which FOF telemetry
files have not yet been decompressed by the ZIPFOF process and thus are not ready to be processed by the
EDPS FOF Conversion pipeline.
Field name type/size description
---------- --------- -----------
product_rootname C14 IPPPSSOOT for jitter or astrometry products;
GYYYYDDDHHMMSS for GS acquisition data
product_type C3 FGS for jitter, AST for astrometry, or GSA for GS
acqusition data
eng_rootname C12 TYYYYDDDHHMM, rootname of the ENG telemetry file
eng_ready C1 (Y/N), 'N' indicates the telemetry file eng_rootname is not
yet recognized as ready for this product_type. 'Y' indicates
that the processing for this product type has recognized
the presence of eng_rootname. Having separate control for
each product type simplifies initiation of processing. "
Database Queries Performed
PNMFOF Process Queries
- The PNMFOF process performs the following query on the pnmfof_table
relation to determine if any of the FOF files listed in the PNM file currently being processed have been
previously received in other PNM files; i.e., if the current PNM file is a duplicate.
SELECT count(*) pnm_count
FROM pnmfof_table
WHERE fof_name = FOF_name
The PNMFOF process performs the following query on the pnmfof_table
relation to delete the records associated with a given PNM file which has been determined to be a
duplicate. This allows the duplicate PNM file to be "shoved" thru the EDR pipeline.
DELETE FROM pnmfof_table
WHERE pnm_name = PNM_name
AND pnm_notification_date = PNM_notification_date
The PNMFOF process performs the following query on the pnmfof_table
relation to determine if a specific PNM file has been previously received; i.e., if the PNM file is a
duplicate.
SELECT count(*) pnm_count
FROM pnmfof_table
WHERE pnm_name = PNM_name
AND pnm_notification_date = PNM_notification_date
The PNMFOF process performs the following query on the pnmfof_table
relation to insert new records which indicate what PNM files have been received and what FOF file are
listed in what PNM files.
INSERT pnmfof_table (pnm_name, pnm_notification_date, pnm_receipt_date, fof_name, fof_transfer_date,
fof_complete_date)
VALUES (PNM_name, PNM_notification_date, PNM_receipt_date, FOF_name, FOF_transfer_date, ' ')
The PNMFOF process performs the following query on the product_eng_map
relation to indictate that FOF files received from CCS have not yet been decompressed and are thus not
ready to be processed by the EDPS FOF Conversion pipeline.
UPDATE product_eng_map
SET eng_ready = 'N'
WHERE eng_rootname = FOF_name
CLNFOF Process Queries
- The CLNFOF process performs the following query on the pnmfof_table
relation to populate the fof_complete_date field in the current PNM entry for a given FOF file.
(If a FOF file is re-delivered and re-processed, the fof_complete_date for any previous delivery of
the FOF file in an earlier PNM is preserved.) This update indicates that the FOF file has been
decompressed by the ZIPFOF process.
UPDATE pnmfof_table
SET fof_complete_date = FOF_complete_date
WHERE fof_name = FOF_name
AND pnm_name = ( SELECT MAX(pnm_name)
FROM pnmfof_table
WHERE fof_name = FOF_name )
The CLNFOF process performs the following query on the pnmfof_table
relation to get the name of the last PNM file a FOF file was listed in.
SELECT pnm_name FROM pnmfof_table
WHERE fof_name = FOF_name
ORDER BY pnm_receipt_date
The CLNFOF process performs the following query on the pnmfof_table
relation to determine if all of the FOF files listed in a given PNM file have been decompressed.
SELECT count(*) pnm_count FROM pnmfof_table
WHERE pnm_name = PNM_name
AND fof_complete_date < pnm_receipt_date