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 replica | grep -v Replica | head -n3000 | awk -F: '{print $1}' |
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
#https://cloudera.github.io/cm_api/apidocs/v7/index.html | |
curl -u 'admin:admin' -X POST -H "Content-Type:application/json" -d '{"items":["hive"]}' 'http://localhost:7180/api/v7/clusters/cluster/services/hive/commands/restart' |
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
/usr/share/cmf/schema/scm_prepare_database.sh mysql scm scm scmpass |
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 -v -j -k -L -H "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u51-b16/jdk-8u51-linux-x64.rpm > jdk-8u51-linux-x64.rpm | |
/etc/profile.d/java.sh | |
#!/bin/bash | |
JAVA_HOME=/usr/java/jdk1.8.0_51/ | |
PATH=$JAVA_HOME/bin:$PATH | |
export PATH JAVA_HOME | |
export CLASSPATH=. | |
chmod +x /etc/profile.d/java.sh |
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
/sbin/grub-install --root-directory=/mnt /dev/sdb | |
or | |
mount --bind /dev/ /mnt/dev | |
mount --bind /proc/ /mnt/proc | |
chroot /mnt/ | |
grub-install /dev/sda | |
if The file /mnt/boot/grub/stage1 not read correctly. |
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
dump 0uf - /dev/sda1 | (cd /mnt/hd; restore rvf - ) |
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
yarn application -list | grep -o '^app[a-z0-9_]*' | xargs -n 1 -I {} sh -c "yarn application -kill {}" |
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
sudo -u hdfs hadoop fs -du /user/history | awk '/^[0-9]+/ { print int($1/(1024**3)) " [GB]\t" $3 }' |
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
use admin; | |
db.system.users.remove({}) | |
db.system.version.remove({}) | |
db.system.version.insert({ "_id" : "authSchema", "currentVersion" : 3 }) | |
var schema = db.system.version.findOne({"_id" : "authSchema"}) | |
schema.currentVersion = 3 | |
db.system.version.save(schema) | |
use admin |
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
Encrypt | |
% tar cz folder_to_encrypt | \ | |
openssl enc -aes-256-cbc -e > out.tar.gz.enc | |
Decrypt | |
% openssl aes-256-cbc -d -in out.tar.gz.enc | tar xz | |
Or using gpg |