Skip to content

Commit

Permalink
Switch rucio dm mon mongo
Browse files Browse the repository at this point in the history
  • Loading branch information
nikodemas committed Dec 19, 2023
1 parent 7eba1d7 commit 706206c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions rucio-dataset-monitoring/spark/cron4rucio_hdfs2mongo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ 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
##H - mongoauthdb : MongoDB database for authentication. Required for mongoimport `--authenticationDatabase` argument
##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'.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 706206c

Please sign in to comment.