java -cp gacl-client-1.2.4-RC.jar DirectorySender -h java -cp gacl-client-1.2.4-RC.jar DirectorySender \ -a gaclhost:8080 -s C:\Projects\Sandbox\test\
Note: The DirectorySender client can include metadata when sending files against the access layer. In order to include metadata like for example 'originalFileName' follow the steps:
originalFileName = setup.exe anotherProperty = anotherValue
The command line client supports waiting on GRID jobs to get finished. This allows exact tracing when the complete END-TO-END processing was finished on a particular file.
java -cp gacl-client-1.2.4-RC.jar DirectorySender -s C:\test-files --wait -v -f -a localhost:8080 Starting job 'dfbbd78a-7680-44ac-9bea-7bb81535b2f8' with source 'file:/C:/test-files/file1.exe' at 'Wed Jul 28 16:09:31 CEST 2010' Sending C:\test-files\file1.exe - OK (updated). Starting job '4d772f26-0d57-4bf3-85a2-d9f6239de54a' with source 'file:/C:/test-files/file2.exe' at 'Wed Jul 28 16:09:31 CEST 2010' Sending C:\test-files\file2.exe - OK (updated). 2 Jobs still pending, continue waiting (abort with CTRL-C). 2 Jobs still pending, continue waiting (abort with CTRL-C). 2 Jobs still pending, continue waiting (abort with CTRL-C). Finished: dfbbd78a-7680-44ac-9bea-7bb81535b2f8: C:\test-files\file1.exe in 29,128 sec 1 Jobs still pending, continue waiting (abort with CTRL-C). 1 Jobs still pending, continue waiting (abort with CTRL-C). Finished: 4d772f26-0d57-4bf3-85a2-d9f6239de54a: C:\test-files\file2.exe in 46,686 sec Time: 50,791 sec
java -cp gacl-client-1.2.4-RC.jar DirectorySender -h
GRID Directory Sender - Version 1.0 Sends directories into the GRID using the Source and Processing services offered by the GRID Access Layer (GACL). Options: -h, --help, /? Prints help. -s, --dir Specifies the source directory containing the files to send. -R, -r Enables recursive directory scanning -f, --force Force sending. (Disables de-duplication). --uri-prefix Defines an URI prefix to use instead of using 'file:/' uris. -m, Specifies the extension to use for looking after metadata --metadata-ext properties files. Metadata properties files contain key & value pairs that are used as source metadata when sending files. The default search algorithm appends the specified extension to the filename of the source file and searches for a corresponding properties file in the same path. In case of the extension ends with '.xml', the detault XML based metadata format is assumed instead of java properties file styled metadata. Default: '.properties' --wait Wait on jobs to get finished. When enabled waits unitl all jobs are labelled finished before returning. -v, --verbose Be verbose. -a, --address Specifies the address of the ACL instance. Valid values are 'hostname' or 'hostname:port' Default: 'localhost:8080' --ssl Use SSL. -u, --username Sets the username to use for authentication. Default: '' -p, --password Sets the password to use for authentication. Default: ''
Source Code of the Client: DirectorySender.java