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 | |
| now=$(date +"%m_%d_%Y") | |
| file=hadoop_backup_$now | |
| cd ~ | |
| mkdir -p $file | |
| hdfs dfs -ls / | grep "^[d-]"| awk '{print $8}' | while read line; do hdfs dfs -get $line $file ; done | |
| zip -r $file.zip $file |
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
| # !!CHANGE THIS!! | |
| HVERSION=2.7.5 | |
| #!! AND LET IT RUN | |
| brew install gcc autoconf automake libtool cmake snappy gzip bzip2 zlib openssl | |
| cd ~ | |
| mkdir -p tmp | |
| cd ~/tmp |
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
| require 'json' | |
| require 'csv' | |
| # Transforms CSV into JSON and saves it next to the CSV. | |
| # Paths to CSV accepted as an input argument | |
| csv_in = ARGV[0] | |
| ARGV.clear | |
| while true | |
| break if !csv_in.nil? && File.exist?(csv_in) |
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/bin/perl | |
| # Perl script to fast switch between maven settings. Applicable to other programs as well. | |
| # Expects an original file like settings.xml and reference files like settings.xml.alfa1 | |
| # and settings.xml.alfa2. These are in the same $m2Folder. When run gives user list of | |
| # postfixes of the original file to chose from (alfa1, alfa2). And that file will | |
| # overwrite the original settings.xml | |
| use warnings; | |
| use File::Copy; |
NewerOlder