linux - How to get number of worker, cores, ram from HDI cluster -


here scenario. creating hdi cluster , installing custom application using arm template.

i need following values configured application using shell script. installing application using customscript option in arm template.

number of worker nodes

number of cores per worker node

ram per worker node

ram per head node

number of cores per worker node

you use ambari rest api number of worker nodes.

password=<> clustername=<> #worker nodes   curl -u admin:$password -ss -g "https://$clustername.azurehdinsight.net/api/v1/clusters/$clustername/services/hdfs/components/datanode">worker.txt cat worker.txt |grep total_count|awk -f: '{print $2}'|sed 's/\,//g' 

ram per worker node

do mean vm's max ram? if yes, every worker node vm should have same ram. vm's ram , cores decided vm's size. more information please refer link. if want achieve script. suggest write configure file, such as

standard_ds1_v2 1   3.5  standard_ds2_v2 2   7 

you core , mem using awk, easy. such example.

mem=`cat configure.txt|grep "standard_ds1_v2"|awk '{print $3}` 

Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -