This file contains hidden or 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
DAEMON_PATH=/usr/bin | |
DAEMON_NAME=zookeeper | |
# Check that networking is up. | |
#[ ${NETWORKING} = "no" ] && exit 0 | |
PATH=$PATH:$DAEMON_PATH | |
# See how we were called. | |
case "$1" in | |
start) |
This file contains hidden or 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
curl -u admin:admin http://10.2.14.81:7180/api/v8/cm/deployment > cme-cm-export.json |
This file contains hidden or 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
#!/bin/bash | |
#Variables | |
TODAY=$(date +"%Y-%m-%d-%H%M") #date and time | |
BACKUP_PATH="/home/backup/hadoop/fsimage" #path to store metadata | |
RT_DAYS="4" #Rentention in days | |
#Logic | |
if [ -d ${BACKUP_PATH} ]; then | |
cd ${BACKUP_PATH} |
This file contains hidden or 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
mysqlcheck -u root -p --auto-repair --check --optimize --all-databases |
This file contains hidden or 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
pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U |
This file contains hidden or 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
hive -e 'set -v;' | cut -c 1-80 | grep mapred |
This file contains hidden or 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
--------------- For 32-bit Systems --------------- | |
# cd /opt | |
# wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-i586.rpm" | |
# wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jre-8u45-linux-i586.rpm" | |
--------------- For 64-bit Systems --------------- | |
# cd /opt | |
# wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.rpm" |
This file contains hidden or 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
#!/bin/bash | |
# | |
# $Author:$ | |
# $Id:$ | |
# | |
# Fix the under replicated blocks by setting the replication factor for all of the | |
# under replicated blocks | |
# | |
# Nikhil Mulley | |
# |
This file contains hidden or 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
hadoop fsck / | egrep -v '^\.+$' | grep -v eplica |
This file contains hidden or 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
for f in `hadoop fsck / | grep "Replica placement policy is violated" | |
| head -n3000 | awk -F: '{print $1}'`; do | |
hadoop fs -setrep 4 $f | |
hadoop fs -setrep 3 $f | |
done |
OlderNewer