1. Building client application
If you haven't built CLI client yet, jump to section Using Catalogue Client at Gateway - fast track
2. Adding variables into database
Catalog QT ver. 2
has the notion of variable - variables define what can be stored inside database. Putting it simple, variable defines what element of summary
IDS should be read from input data and stored inside Catalogue QT. From user's perspective it's just a matter of adding variables into Catalogue QT. This process is quite simple and all you have to do is to run CLI based client with proper description of variables.
2.1. Generating list of variables
The easiest way to generate variables inside Catalogue QT is to use XML transformation and pass the result to CLI based client.
> cd catalog_qt_2/client/catalog-ws-client > xsltproc ../../sql/feed/imas/dumpSummaryFields.xsl $IMAS_PREFIX/include/IDSDef.xml > variables > java -jar ./target/catalogAPI.jar -addVariables --url http://catalog:8080 --variables-file `pwd`/variables
Once this action is finished Catalog QT will be aware of all the variables that are supposed to be collected.
2.1.1. Anatomy of variable description
In case you are interested in the format of variable definition, here it goes.
3. Adding request into database
Catalog QT revolves around the concept of so called Request. Due to the fact that import may take time, users don't perform it in a blocking way. Instead users just tell Catalog QT what they want to have stored inside Catalog QT database. Then, requests are processed in background by Catalog QT Update Process.
Submitting new request is quite simple. All you have to do is to run CLI client with -addRequest
argument.
Please note that pulse file you want to populate must be visible on the machine where Catalog QT Update Process is running.
> java -jar ./target/catalogAPI.jar -addRequest --url http://catalog:8080 --user g2michal --experiment-uri ""
4. Using Catalogue Client at Gateway - fast track
At Gateway there is a dedicated machine that hosts Catalogue QT Web Services - http://catalog:8080
The easiest way to get Catalogue QT client is to run it at Gateway. Here are the steps to run it
# You need IMAS environment with Open JDK 11 > module purge > module load cineca > module load imasenv > module unload itm-java > module load openjdk # You have to clone source repository (you need to request access if you haven't done so) # https://gforge6.eufus.eu/gf/project/catalog_qt_2/ - and "Request to join project" > git clone https://gforge6.eufus.eu/git/catalog_qt_2 Cloning into 'catalog_qt_2'... Username for 'https://gforge6.eufus.eu': YOUR_GW_USER_NAME Password for 'https://g2michal@gforge6.eufus.eu': YOUR_GW_PASSWORD > cd catalog_qt_2/client/catalog-ws-client/ > mvn org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install-file \ -Dfile=${IMAS_PREFIX}/jar/imas.jar \ -DgroupId=imas -DartifactId=imas \ -Dversion=1.0.0-SNAPSHOT -Dpackaging=jar \ -DlocalRepositoryPath=`pwd`/local-maven-repo > mvn install -DskipTests # You are ready to Cataogue QT client application > java -jar ./target/catalogAPI.jar -help usage: java -jar ${FULL_PATH_TO_CATALOG_API_JAR}/catalogAPI.jar -help show help -listRequests List all available requests requires: --url optional: --pretty-format -addRequest Add new request into database requires: --url, --experiment-uri, --user -listVariables List all the variables defined inside Catalog requires: --url -addVariables Add variables from the file into Catalog requires: --url, --variables-file -startUpdateProcess Start application in Update Process mode requires: --url optional: --wait-time, --slice-limit -verbose Be verbose --url <URL> Catalog API URL --variables-file <FILE> File with the list of variables --experiment-uri <EXPERIMENT URI> Input data URI format: mdsplus:/?shot=##;run=##;machine=# #;user=##;version=## --user <USER_NAME> Name of the user performing the action --wait-time <SECONDS> You can specify number of seconds before Update Process starts to process next request --slice-limit <NUMBER_OF_SLICES> You can specify maximum number of time slices to be populated. Useful in case of huge input files. --pretty-format If applicable, this option will make the code to print output as pretty as possible