CTsync monitors a file folder in real-time and converts new files to CloudTurbine’s time-stamped folder structure. CTsync has options to produce either uncompressed or zipped output, delete or retain original files, and to monitor one-level or recursively down a folder hierarchy.
java -jar CTsync.jar -h
java -jar CTsync.jar [-h] [-r] [-c] [-z] [-u] [-x] [-d] [-t <mpacetime>] [-n <outName>] [CVdir [StreamDir [mflush]]]
-h show this message
-r watch all directories and sub-directories
(default is watch only the top directory)
-c copy files from source to CT output destination;
this is the default if neither the -z nor -u flags are specified
-z ZIP input files together before writing to the CT destination
-u unzip input ".zip" files before writing to the CT destination
-x display debug information
-d delete input file after writing to the CT destination
-t <mpacetime> msec file timestamp period in a ZIP file
(spreads the files in a ZIP across time)
-n <outName> optional output channel name
(default is to use the input file name)
CVdir current value input folder (ie, source folder);
folder must exist when CTsync launches; default = "CV"
StreamDir CloudTurbine output root folder;
default = "Stream"
mflush msec period for flushing output ZIP files
Consider the following example run on a Microsoft Windows operating system:
java -jar CTsync.jar -z -d C:\TEMP\CV CTdata\TemperatureData 10000
In this example, CTsync will monitor folder C:\TEMP\CV for files, add these input files to a growing ZIP file and write this ZIP file out to CTdata\TemperatureData every 10 seconds (or slower, depending on the rate new files show up). With the “-d” flag, files are deleted from C:\TEMP\CV after CTsync reads them.
Run the above command and then put files into C:\TEMP\CV named temperature which contain a single number. Periodically put a new temperature file into the directory. Note that after putting each new file into C:\TEMP\CV, it is deleted by CTsync almost instantaneously. View the growing CloudTurbine source at CTdata\TemperatureData. You can view the CloudTurbine data using WebScan and CTWeb if desired.