2016-07-20 3 views

答えて

0
BI_HOST=your_biginsights_mastermanager_hostname 
BI_USER=your_biginsights_username 
BI_PASS=your_biginsights_password 

BASE_URL=https://${BI_HOST}:9443 

CLUSTER_NAME=$(curl -k -s -u ${BI_USER}:${BI_PASS} -H 'X-Requested-By:ambari' \ 
    ${BASE_URL}/api/v1/clusters | python -c \ 
    'import json,sys;print json.load(sys.stdin)["items"][0]["Clusters"]["cluster_name"]') 

BIGSQL_HOST=$(curl -k -s -u ${BI_USER}:${BI_PASS} -H 'X-Requested-By:ambari' \ 
    ${BASE_URL}/api/v1/clusters/${CLUSTER_NAME}/services/BIGSQL/components/BIGSQL_HEAD | \ 
    python -c \ 
    'import json,sys;print json.load(sys.stdin)["host_components"][0]["HostRoles"]["host_name"]') 

echo ${BIGSQL_HOST} 

これらのコマンドは、BigInsightクラスタまたはクライアントマシンで実行できます。

アンバリコードのためにPierre Regazzoniに感謝します。

関連する問題