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
installedLibs <- installed.packages() | |
writeLibs <- paste0("install.packages(\"", installedLibs[, 1], "\")") | |
write.table(writeLibs, file = "~/install_libs.R", row.names = F, col.names = F, quote = F) |
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 -S -e 'SET hive.cli.print.header=true; SELECT * FROM default.some_table LIMIT 0;' | sed -e 's/\t/,/g' > headers.txt |
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
fpm -s dir -t rpm -n "cabal" -v "1.20.0.3" -p "cabal-1.20.0.3.rpm" /opt/cabal/1.20.0.3 | |
fpm -s dir -t rpm -n "ghc" -v "7.8.3" -p "ghc-7.8.3.rpm" /opt/ghc/7.8.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
die () { printf "\nError during cabal-install bootstrap:\n$1\n" >&2 && exit 2 ;} |
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
# install mysql | |
cd ~/cdh-preinstall | |
apt-get install mysql-server mysql-client libmysql-java -y | |
# stop and copy in new my.cnf | |
sudo service mysql stop | |
sudo cp files/my.cnf.ubuntu /etc/mysql/my.cnf | |
# restart mysql and secure | |
sudo mysql 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
find . -name *.jar -exec md5 {} \; | egrep -v 'tests|original' | cut -d'/' -f4 | sed 's/)//g' | awk -F'=' '{print $2 " " $1'} | sort -k2 |
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
$ cd $(brew --prefix) | |
$ brew update | |
$ brew uninstall hadoop | |
Uninstalling /usr/local/Cellar/hadoop/2.4.1... | |
$ brew versions hadoop | |
Warning: brew-versions is unsupported and will be removed soon. | |
You should use the homebrew-versions tap instead: | |
https://github.com/Homebrew/homebrew-versions | |
2.4.1 git checkout a20feb2 /usr/local/Library/Formula/hadoop.rb |
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 tarball download extracted into /usr/local | |
hadoop jar /usr/local/hadoop/share/hadoop/mapreduce2/hadoop-mapreduce-examples-2.3.0-cdh5.1.0.jar pi 10 1000000 | |
# for brew install using latest 2.4.1 release | |
hadoop jar /usr/local/Cellar/hadoop/2.4.1/libexec/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.4.1.jar pi 10 1000000 | |
# for CDH 4.6 | |
hadoop jar /usr/lib/hadoop-0.20-mapreduce/hadoop-examples-2.0.0-mr1-cdh4.6.0.jar pi 10 1000000 |
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
df[sample(nrow(df), 100, replace=TRUE), ] |
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 daemonlog -setlevel <namenode host>:50070 org.apache.hadoop.hdfs.server.blockmanagement.BlockPlacementPolicy DEBUG |
NewerOlder