Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: SteadyState section save

...

The configuration used for this example can be downloaded using the following link and then directly opened in the XML Editor using the following link:

...

The configuration used for this example can be downloaded using the following link and then directly opened in the XML Editor using the following link:

...

  • Prepare your command line interface to run JADE with the local_2_local_check_steady_state profile using the command line call listed below but do not yet start the transfer.
  • The second file transfer program should be configured to allow a maximum rate of around 16 kB/s. This transfer rate will mean that the download of each example file (approx. 220kB ) will take around 15 seconds. This will provide sufficient time for JADE to be started with the local_2_local_check_steady_stateProfile below, find the files being transferred and note that its own file transfer operation cannot be started until the download has been completed.
  • Log onto our test FTP server with the second file transfer program using the same host, user & password as listed in other examples on this page. 
  • Select the three test_large_*.txt files, which you will find in the demo user's large folder.
    • Start downloading the selected files to the jade_demo/a folder.
  • Quickly start JADE with the local_2_local_check_steady_state' profile.

 

...

languagebash

...

Download file

The configuration used for this example can be downloaded using the following link and then directly opened in the XML Editor:

XML Editor Configuration

Local to local file transfer is used in the JADE part of this example so a ProtocolFragment element is not required. The configuration used to demonstrate atomic file transfer is uses the ftp_demo_sos-berlin Protocol Fragment already used in several of the tutorials in this series. The two FileSpecSelection elements in the Profile point to three large files in a subfolder on the test server. A tilde (~) is used as an AtomicSuffix and an AtomicPrefix is not required.

Image Added

The Profile Code

The following code boxes can be opened to show the Profile used in this example in XML and in settings.ini formats.

Code Block
languagetext
titleThe 'local_2_local_steady_state' Profile in XML Format
collapsetrue
 <?xml version="1.0" encoding="utf-8"?>
<Configurations>
  <Fragments>
    <ProtocolFragments />
  </Fragments>
  <Profiles>
    <Profile profile_id="local_2_local_steady_state">
      <Operation>
check_steady_state]
;;
 operation                    = copy
 file_spec                    = ^test_large_1\.txt$
 check_steady_state_of_files  = true
 steady_state_count           = 10
 check_steady_state_interval  = 2
;;
 source_host         <Copy>
         = localhost<CopySource>
 source_protocol           <CopySourceFragmentRef>
     = local
 source_dir       <LocalSource />
           = ${USERPROFILE}\jade_demo\a
;;
 target_host </CopySourceFragmentRef>
            <SourceFileOptions>
          = localhost
 target_protocol  <Selection>
            = local
 target_dir  <FileSpecSelection>
                 = ${USERPROFILE}\jade_demo\b

Start the profile using:

Code Block
languagebash
jade.cmd -settings="%USERPROFILE%\jade_demo\jade_settings.ini" -profile="local_2_local_check_steady_state"
 <FileSpec><![CDATA[^test_large_.\.txt$]]></FileSpec>
                  <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory>
                </FileSpecSelection>
              </Selection>
              <CheckSteadyState>
                <CheckSteadyStateInterval>1</CheckSteadyStateInterval>
                <CheckSteadyStateCount>30</CheckSteadyStateCount>
              </CheckSteadyState>
            </SourceFileOptions>
          </CopySource>
          <CopyTarget>
            <CopyTargetFragmentRef>
              <LocalTarget />
            </CopyTargetFragmentRef>
            <Directory><![CDATA[${USERPROFILE}\jade_demo\b]]></Directory>
          </CopyTarget>
        </Copy>
      </Operation>
    </Profile>
  </Profiles>
</Configurations>
Code Block
languagetext
titleThe 'local_2_local_steady_state' Profile in settings.ini Format
collapsetrue
[local_2_local_steady_state]
operation                           = copy
source_protocol                     = local
file_spec                           = ^test_large_.\.txt$
source_dir                          = ${USERPROFILE}\jade_demo\a
check_steady_state_of_files         = true
check_steady_state_interval         = 1
steady_state_count                  = 30
target_protocol                     = local
target_dir                          = ${USERPROFILE}\jade_demo\b
Running the Profile

This profile is called on Windows systems using the following command, depending on the JADE version being used:

Code Block
languagebash
titleRunning the file transfer configuration in Windows format using an XML (JADE 1.11 and later) or settings.ini file (JADE 1.10 and earlier)
jade.cmd -settings="%USERPROFILE%\jade_demo\local_2_local_steady_state.xml" -profile="local_2_local_steady_state"
jade.cmd -settings="%USERPROFILE%\jade_demo\local_2_local_steady_state.xml" -profile="local_2_local_steady_state"

On Unix systems the profile is called using one of the following commands, again depending on the JADE version being used:

Code Block
languagebash
titleRunning the file transfer configuration in Unix format using an XML (JADE 1.11 and later) or settings.ini file (JADE 1.10 and earlier)
./jade.sh -settings="${HOME}/jade_demo/local_2_local_steady_state.xml" -profile="local_2_local_steady_state"
./jade.sh -settings="${HOME}/jade_demo/local_2_local_steady_state.xml" -profile="local_2_local_steady_state"
Behavior

Start the profile using:

Code Block
languagebash
jade.cmd -settings="%USERPROFILE%\jade_demo\jade_settings.ini" -profile="local_2_local_check_steady_state"

Behavior - Check Behavior - Check Steady State of incoming files

Once JADE starts executing the profile the command line interface will show a series of messages containing the following:

...

line interface will show a series of messages containing the following:

Code Block
languagebash
main INFO  10:37:00,924   (SOSDataExchangeEngine.java:1050) ::setInfo 3 files found for regexp '^test_large_.\.txt$'.
main INFO  10:37:00,925   (SOSDataExchangeEngine.java:1050) ::setInfo checking file(s) for steady state
main INFO  10:37:00,926   (SOSDataExchangeEngine.java:130) ::checkSteadyStateOfFiles steady check (1 of 10). waiting 2s.
main INFO  10:37:02,931   (SOSDataExchangeEngine.java:148) ::checkSteadyStateOfFiles steady check (1 of 10). Changed. file size: new = 131072 bytes, old = 98304 bytes. 'C:\Users\aa

...

\jade_demo\a\test_large_1

...

.txt

...

'

The two checkSteadyStateOfFiles INFO messages will repeat until a steady state is noted for each file and the transfer of that file is started.

 

...