diff --git a/rucio-dataset-monitoring/spark/cron4rucio_hdfs2mongo.sh b/rucio-dataset-monitoring/spark/cron4rucio_hdfs2mongo.sh index 6564c6f5..59faf353 100755 --- a/rucio-dataset-monitoring/spark/cron4rucio_hdfs2mongo.sh +++ b/rucio-dataset-monitoring/spark/cron4rucio_hdfs2mongo.sh @@ -12,7 +12,6 @@ set -e ##H - keytab : Kerberos auth file to connect Spark Analytix cluster (cmsmonit) ##H - hdfs : HDFS_PATH output path that include spark job results. Mongoimport will import them. ##H - mongohost : MongoDB host -##H - mongoport : MongoDB port ##H - mongouser : MongoDB user which has write access to required MongoDB database/collection ##H - mongopass : MongoDB user password ##H - mongowritedb : MongoDB database name that results will be written @@ -20,8 +19,9 @@ set -e ##H - wdir : working directory ##H ##H Usage Example: -##H ./cron4rucio_hdfs2mongo.sh --keytab ./keytab --hdfs /tmp/cmsmonit --mongohost $MONGO_HOST --mongoport $MONGO_PORT \ -##H --mongouser $MONGO_ROOT_USERNAME --mongopass $MONGO_ROOT_PASSWORD --mongowritedb rucio --mongoauthdb admin --wdir $WDIR +##H ./cron4rucio_hdfs2mongo.sh --keytab ./keytab --hdfs /tmp/cmsmonit --mongohost $MONGO_HOST \ +##H --mongouser $MONGO_ROOT_USERNAME --mongopass $MONGO_ROOT_PASSWORD --mongowritedb rucio \ +##H --mongoauthdb admin --wdir $WDIR ##H ##H How to test: ##H - You can test just by giving different '--mongowritedb'. @@ -51,12 +51,12 @@ if [ "$1" == "" ] || [ "$1" == "-h" ] || [ "$1" == "--help" ] || [ "$1" == "-hel exit 0 fi util_cron_send_start "$myname" "1d" -unset -v KEYTAB_SECRET HDFS_PATH ARG_MONGOHOST ARG_MONGOPORT ARG_MONGOUSER ARG_MONGOPASS ARG_MONGOWRITEDB ARG_MONGOAUTHDB WDIR help +unset -v KEYTAB_SECRET HDFS_PATH ARG_MONGOHOST ARG_MONGOUSER ARG_MONGOPASS ARG_MONGOWRITEDB ARG_MONGOAUTHDB WDIR help # ------------------------------------------------------------------------------------------------------------- PREPARE util4datasetmon_input_args_parser $@ -util4logi "Parameters: KEYTAB_SECRET:${KEYTAB_SECRET} HDFS_PATH:${HDFS_PATH} ARG_MONGOHOST:${ARG_MONGOHOST} ARG_MONGOPORT:${ARG_MONGOPORT} ARG_MONGOUSER:${ARG_MONGOUSER} ARG_MONGOWRITEDB:${ARG_MONGOWRITEDB} ARG_MONGOAUTHDB:${ARG_MONGOAUTHDB} WDIR:${WDIR}" -util_check_vars HDFS_PATH ARG_MONGOHOST ARG_MONGOPORT ARG_MONGOUSER ARG_MONGOPASS ARG_MONGOWRITEDB ARG_MONGOAUTHDB WDIR +util4logi "Parameters: KEYTAB_SECRET:${KEYTAB_SECRET} HDFS_PATH:${HDFS_PATH} ARG_MONGOHOST:${ARG_MONGOHOST} ARG_MONGOUSER:${ARG_MONGOUSER} ARG_MONGOWRITEDB:${ARG_MONGOWRITEDB} ARG_MONGOAUTHDB:${ARG_MONGOAUTHDB} WDIR:${WDIR}" +util_check_vars HDFS_PATH ARG_MONGOHOST ARG_MONGOUSER ARG_MONGOPASS ARG_MONGOWRITEDB ARG_MONGOAUTHDB WDIR util_setup_spark_k8s # Check commands/CLIs exist