Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
outlinh1. true
outlinh1. true
1printablefalse
2stylh1. none
3indent20px

General

The JADE has many features to simplify the day to day data file transfer requirements. One of the JADE's such feature is Atomic Transfer.

Scenario

In some use cases on target server files are automatically picked up either directory monitoring applications or FTP server daemons, while being transferred by JADE. In case of large file size data transfer take some seconds, but usually the directory watchers pickup the file as soon as initial bytes are written on the target server.

Solution

To avoid any partially transferred file being picked up by the directory watchers JADE has inbuilt a built-in feature called Atomic atomic transfer.

  • JADE has two parameters atomic_prefix and atomic_suffix to configure atomic transfer. 
  • As the name suggest, during file transfer JADE will create a temporary file on target server with atomic_prefix and atomic_suffix in the filename, thus make it virtually hidden for the directory watchers. 
  • As soon as file transfer has completed without error, then JADE

...

  • renames the file to its original name. In

...

  • case of any error partially transferred files will be deleted from the target server.

To configure atomic transfer either of atomic_prefix or atomic_suffix, or both together can be used. The user can use apply any character or word as prefix/suffix as long as a directory watcher do would not recognize the prefix/suffix as a wild characterbeing a valid part of the expected file name.

JADE JITL job example

Code Block
languagehtml/xml

<job
     title = "API Job for JobScheduler Advanced Data Exchange"
     order = "yes"  stop_on_error = "no" >

     <description>
       <include file = "jobs/JADE-Job.xml" />
     </description>
    
     <params>
       <param name = "atomic_prefix" value = "~" />
       <param name = "atomic_suffix" value = "~" />
       <param name = "file_spec"     value = "^report\.csv$" />
       <param name = "host"          value = "ftp.example.com" />
       <param name = "local_dir"     value = "." />
       <param name = "operation"     value = "copy" />
       <param name = "passive_mode"  value = "false" />
       <param name = "password"      value = "top-secret" />       
       <param name = "remote_dir"    value = "." />       
     </params>

     <script language   = "java"
             java_class = "sos.scheduler.jade.JadeJob" >
     </script>
 </job>