This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.mail.*; | |
import javax.mail.internet.*; | |
@GrabConfig(systemClassLoader=true) | |
@Grapes( | |
@Grab(group='javax.mail', module='mail', version='1.4.4') | |
) | |
// setup connection | |
Properties props = new Properties(); | |
def host = "localhost"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USER='admin' | |
PASS='admin' | |
CLUSTER='dev' | |
HOST=$(hostname -f):8080 | |
function start(){ | |
curl -u $USER:$PASS -i -H 'X-Requested-By: ambari' -X PUT -d \ | |
'{"RequestInfo": {"context" :"Start '"$1"' via REST"}, "Body": {"ServiceInfo": {"state": "STARTED"}}}' \ | |
http://$HOST/api/v1/clusters/$CLUSTER/services/$1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. under Ambari-> knox -> Advanced topologies | |
2. add following snippet in advanced topologies | |
<provider> | |
<role>ha</role> | |
<name>HaProvider</name> | |
<enabled>true</enabled> | |
<param> | |
<name>HIVE</name> |