Skip to content

Instantly share code, notes, and snippets.

View emres's full-sized avatar
💭
"The purpose of computing is insight, not numbers." -- Richard W. Hamming

Emre Sevinç emres

💭
"The purpose of computing is insight, not numbers." -- Richard W. Hamming
View GitHub Profile
@emres
emres / control.sh
Created April 27, 2017 14:17 — forked from randerzander/control.sh
Ambari Service Start/Stop script
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
}
@emres
emres / stormTopologyCheck.py
Created April 27, 2017 10:02 — forked from wesfloyd/stormTopologyCheck.py
Script runs constantly at X seconds interval checking to see if topologies have stopped processing new Tuples
# Wes Floyd April 2015
import sys
import requests
import json
import argparse
import pprint
import time
pp = pprint.PrettyPrinter(indent=4)
  1. General Background and Overview