manika137 commented on code in PR #7564: URL: https://github.com/apache/hadoop/pull/7564#discussion_r2044172156
########## hadoop-tools/hadoop-azure/dev-support/testrun-scripts/configsupport.sh: ########## @@ -106,52 +102,112 @@ obseleteConfigsList=( "enable.append.support" #fs.azure.enable.append.support ) +# ------------------------------------------------------------------------------ +# User Interaction +# ------------------------------------------------------------------------------ + +promptNamespaceType() { + printf "Select 'HNS' if you're migrating to ABFS driver for Hierarchical Namespace enabled account, + or 'Non-HNS' if you're migrating to ABFS driver for Non-Hierarchical Namespace (FNS) account. \n" + printf "WARNING: Please ensure the correct option is chosen as it will affect the configuration changes made to the file. \n" + printf "If you are unsure, follow the instructions below to check from Azure Portal: \n" + printf "* Go to the Azure Portal and navigate to your storage account. \n" + printf "* In the left-hand menu, select 'Overview' section and look for 'Properties'. \n" + printf "* Under 'Blob service', check if 'Hierarchical namespace' is enabled or disabled. \n" + echo "$contactTeamMsg" + select namespaceType in "HNS" "NonHNS" + do + case $namespaceType in + HNS) + xmlstarlet ed -L -i '//configuration/property[1]' -t elem -n property -v '' \ + -s '//configuration/property[1]' -t elem -n name -v 'fs.azure.account.hns.enabled' \ + -s '//configuration/property[1]' -t elem -n value -v 'true' "$OUTPUT_FILE" + break + ;; + NonHNS) + endpoint=".blob." + break + ;; + *) + echo "Invalid selection. Please try again. Exiting..." + exit 1 + ;; + esac + done +} + +# ------------------------------------------------------------------------------ +# Config File Transformations +# ------------------------------------------------------------------------------ + # Stop the script if any unsupported config is found -for key in "${unsupportedConfigsList[@]}"; do - if grep -q "$key" "$OUTPUT_FILE"; then - echo "Remove the following configuration from file and rerun: '$key'" - failure=true +unsupportedConfigCheck() { + for key in "${unsupportedConfigsList[@]}"; do + if grep -q "$key" "$OUTPUT_FILE"; then + echo "Remove the following configuration from file and rerun: '$key'" + failure=true + fi + done + + if [ "$failure" = true ]; then + echo "FAILURE: Unsupported Config Found" Review Comment: Yes, it's being added from the loop above -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org