POST /api/v1/clusters/hdp/requests
{
"RequestInfo": {
"context": "Rebalance HDFS",
"command": "REBALANCEHDFS",
"namenode": "{\"threshold\":\"10\"}"
},
"Requests/resource_filters": [
POST /api/v1/clusters/hdp/requests
{
"RequestInfo": {
"context": "Rebalance HDFS",
"command": "REBALANCEHDFS",
"namenode": "{\"threshold\":\"10\"}"
},
"Requests/resource_filters": [
{ | |
"configurations": [ | |
{ | |
"oozie-env": { | |
"oozie_heapsize": "4096m" | |
} | |
} | |
], | |
"host_groups": [ | |
{ |
{ | |
"host_groups": [ | |
{ | |
"name": "host_group_1", | |
"configurations": [], | |
"components": [ | |
{ | |
"name": "METRICS_COLLECTOR" | |
}, | |
{ |
host_new=ip-10-0-0-162.ec2.internal | |
curl -u admin:admin -i -H X-Requested-By:API -X POST http://${ambari_server}:8080/api/v1/clusters/${cluster_name}/hosts/${host_new} | |
curl -u admin:admin -i -H X-Requested-By:API -X GET http://${ambari_server}:8080/api/v1/clusters/${cluster_name}/hosts/${host_new} | |
worker_services="NODEMANAGER JOURNALNODE HDFS_CLIENT DATANODE FLUME_HANDLER METRICS_MONITOR" | |
for service in ${worker_services}; do | |
curl -u admin:admin -i -H X-Requested-By:API -X POST http://${ambari_server}:8080/api/v1/clusters/${cluster_name}/hosts/${host_new}/host_components/${service} | |
done |
#!/bin/bash | |
checkusage() { | |
[[ $# -eq 0 ]] && err_exit 'Usage: diskcheck.sh DEVICE...' | |
} | |
checkperms() { | |
for disk in $@; do | |
local f="diskcheck.sh: ${disk}" | |
[[ -e ${disk} ]] || err_exit "${f}: No such file or directory" |
## Setting a custom repo for Ambari Stacks via the API | |
cat > temp-update-repo.json <<-EOF | |
{ | |
"Repositories" : { | |
"base_url" : "http://public-repo-1.hortonworks.com/HDP/centos6/2.x/GA/2.2.0.0", | |
"default_base_url" : "http://public-repo-1.hortonworks.com/HDP/centos6/2.x/GA/2.2.0.0", | |
"verify_base_url" : true | |
} | |
} |
#!/bin/sh - | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
# This script provides an easy install of Ambari | |
# for RedHat Enterpise Linux 6 & CentOS 6 | |
# | |
# source at http://github.com/seanorama/ambari-bootstrap | |
# |
# Put expressions that hit more files first. | |
/home/chroot/.* | |
/home/[^/]+/Workspaces?/.*/target/.* | |
/home/[^/]+/Workspaces?/.*/\.pants\.d.* | |
/home/[^/]+/\.m2/repository/.* | |
/home/[^/]+/\.ivy2/(?:cache|local|limiter)/.* | |
/home/[^/]+/.*(?:~|\.(?:log|tmp|bak|lock)) | |
/home/[^/]+/S3/.* | |
/home/[^/]+/Virtualization/Machines/.* |