Monday, November 22, 2010

Input Params for Pig Script

A way to list all the input parameters of a pig script

open FILE, "<", "$pigfile" or die $!;
#GOING through the file to list out Parameters#
while (my $line = <file>) {
      #Only taking non commented line and content inside single quotes#
      if($line !~ /--/ && $line =~ /(')\$(.+?)(\1)/){
           print("\n$2");
}
close(FILE);

Wednesday, November 17, 2010

GIft YourSelf A Road Mishap

Here is the ALGORITHM for getting yourself a perfect GIFT.

1) Pick out a beautiful Day for a ride. When the weather is perfect with a little rain before

2) It helps if you pick out a day after the night when you had a fight with your affable ones. (You can blame them or get enlightened of your mistake)

3) Pick out the day which is officially a holiday

4) In spite of the day being a holiday choose your destination as your office.

5) Enjoy the ride towards your office and try to filter away your negativity.

6) That's it, let the COSMOS do the rest.

:)

Not possible

Here is what will Happen

7) For a change you will enjoy the weather.

8) For a change you shall cruise

9) For a change you shall not find any traffic

10) Then you will have to halt for some bugger in front of you finds the need to do so.

11) Rest leave it to the people on your behind to not find the need to do the same

12) Now enjoy the beautiful feeling of kissing the tar.

13) Enjoy even more the feeling of nakedness of being in a tee and jeans realising the one who desired to ride over you is well dressed with jacket and gloves .

14) Enjoy the fact the day is cooler than the rest, hence intensity is more than usual.

SO ENJOY and GIFT Yourself Something Different today

Monday, November 15, 2010

Diff of two DIR

Love this. Amazingly powerful

diff --brief --recursive <dir1> <dir2>

Wednesday, November 03, 2010

Hadoop 0.21, Pig 0.7, Hive 0.4.1, Sqoop 1.10, Hadoop-LZO, Elephant-Bird

Strangely but truly a lot of time has gone by when the last official hadoop release was made.

Unfortunately Hadoop 0.21 never became an official release but a release candidate was made by Tom White and co.

Felt happy to hack my way through along with a friend to make various software work with Hadoop 0.21

1) Hive 0.4.1
https://github.com/hirohanin/hive0.4.1hadoop21

2) Sqoop 1.1.0
https://github.com/hirohanin/sqoop-1.1.0hadoop21

3) Hadoop-LZO
https://github.com/hirohanin/hadoop-lzo-hadoop21

4) Elephant Bird
https://github.com/hirohanin/elephant-birdpig7hadoop21

5) Pig 0.7

https://github.com/hirohanin/pig7hadoop21

Disclaimer: The software are unofficial and unsupported, unless some one gives a better reason to do so.