Can we use variables in repository setting for location setting. I am defing below but its not working.
$CURL -k -XPUT $DB_HTTP/$SHARD_DIR -d '{
"type": "fs",
"settings": {
"compress": true,
"location": "$BK_LOC/$SHARD_DIR"
}
}'
The variables are already declared during the script execution.
The problem is that your string is single quoted, and shell script variables aren't expanded within single quoted strings. Make them double quoted instead, and remember to escape the double quotes in the JSON payload.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.