Skip to content

Instantly share code, notes, and snippets.

@gbraccialli
Last active November 30, 2015 22:29
Show Gist options
  • Select an option

  • Save gbraccialli/16c7f14e9370548db873 to your computer and use it in GitHub Desktop.

Select an option

Save gbraccialli/16c7f14e9370548db873 to your computer and use it in GitHub Desktop.
#curl -sSL https://gist.githubusercontent.com/gbraccialli/16c7f14e9370548db873/raw/ | sudo -E sh
/var/lib/ambari-server/resources/scripts/configs.sh -u admin -p admin set localhost Sandbox yarn-site "yarn.nodemanager.resource.memory-mb" "5000"
/var/lib/ambari-server/resources/scripts/configs.sh -u admin -p admin set localhost Sandbox hive-site "hive.tez.container.size" "500"
/var/lib/ambari-server/resources/scripts/configs.sh -u admin -p admin set localhost Sandbox hive-site "hive.tez.java.opts" "-server -Xmx400m -Djava.net.preferIPv4Stack=true"
curl -u admin:admin -H 'X-Requested-By: ambari' -X POST -d \
'{
"RequestInfo":{
"command":"RESTART",
"context":"restart yarn and hive",
"operation_level":{
"level":"HOST",
"cluster_name":"Sandbox"
}
},
"Requests/resource_filters":[
{
"service_name":"YARN",
"component_name":"NODEMANAGER",
"hosts":"sandbox.hortonworks.com"
},
{
"service_name":"YARN",
"component_name":"RESOURCEMANAGER",
"hosts":"sandbox.hortonworks.com"
},
{
"service_name":"YARN",
"component_name":"YARN_CLIENT",
"hosts":"sandbox.hortonworks.com"
},
{
"service_name":"HIVE",
"component_name":"HIVE_CLIENT",
"hosts":"sandbox.hortonworks.com"
},
{
"service_name":"HIVE",
"component_name":"HIVE_SERVER",
"hosts":"sandbox.hortonworks.com"
}
]
}' http://localhost:8080/api/v1/clusters/Sandbox/requests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment