Thursday, December 29, 2011

Pig store data in compressed format

Its really easy to compress data while using Pig in compressed format using bz2 format.All you need to do is add '.bz2' extension to the output directory. For e.g.,
STORE data into 'compressedoutput.bz2' USING SomeStore();


Taadaa!!! You are done!

Aother advantage of bz2 is this format is splittable.So if some other subsequent Map/Reduce job is going to read this data, it can be split giving more parallelism.

Awesome easy? isn't it?!

Monday, August 1, 2011

wget with proxy

vey simple but I forget the syntax everytime I want to use it. So, making it available for people like me who quickly want to get to the answer.

How to use proxuy with wget:


export http_proxy=http://proxyserver:port

Then use wget like

"wget -c http://url-u-want-to-wget-with-proxy"


HTH

Tuesday, May 17, 2011

Hadoop issue: jobtracker.info could only be replicated to 0 nodes, instead of 1

After wasting 36 hours of my life, finally found a way to bypass the problem.
Instead of using hadoop/bin/start-all.sh, run each of the commands separately:
* ./bin/hadoop-daemon.sh start namenode
* ./bin/hadoop-daemon.sh start jobtracker
* ./bin/hadoop-daemon.sh start tasktracker
* ./bin/hadoop-daemon.sh start datanode



There still may be some intermediate issue with dfs dir. Try deleting the dfs dir and cleanup everything of the form /tmp/hadoop*
Then do a hadoop namenode -format.

Note: make sure before doing all these things you have killed /stopped all the hadoop processes running on your machine.

Tuesday, July 13, 2010

Life is ...good!!!

well...Life is "Tough"!!!Yes, I know i named this post as 'life is good'..but right now life is tough for me.why?
I am not very good with words..but in this particular case,i can write a pretty good essay about a few things/incidents - which is causing some discomfort to me.But that will be the subject of another post.

Still, I really thank those things/incidents for teaching me some more things about life - the day i get through this, I would be richer ...not by money,but by some 'gyan'.

And because i am going through some discomfort now, i will cherish the coming sunny days more than what i would have w/o all these.


I know its not easy now...but w/o it life would not have been so enjoyable.


Signing off for today,
Souri

Sunday, July 4, 2010

MAC OS cmd + tab not working!!!

Its 1:41 am and although tomorrow I will be working from home,its pretty late.As I was about to hit the sack, I found some issue which I may need to take care of tomorrow(actually, today as it is already past midnight).So other than taking some early measures for that I see that my Mac is not working, specifically cmd + tab is not working along with the supercool Dock and as most Mac users would agree with me, without this you feel kind of strange(non-productive).
A simple solution exists- just restart the system and most proabably it would start working.But as many fellow engineers know,restarting the system is just not-the-thing we look forward to.

So after some soul searching , I tried the following few simple tricks:

1. Somehow open a Finder window ( cmd + m ).
2. Then search for Terminal.app in Applications.
3. Start Terminal
* do "ps -eaf | grep -i Dock"
* then kill the process for Dock
* in my machine it looked like: /System/Library/CoreServices/Dock.app/Contents/MacOS/Dock -psn_0_45067
4. The Dock would restart automatically ( as probably it is some kind of service driven thing) and tadaaa- cmd+tab also starts functioning.

Goodnight :)

Saturday, May 15, 2010

Amar sohore..

raat 11:34 ...amar flatmate ghumote chole geche..ami aka bairer ghore bose or music system e jore gaan sunchi.. Amar sohore..goto koyek din dhore ei gaan ta ektu besi e sunchi...hoeto aro kichudin sunbo..tarpor bore hoe jabo hoeto..kintu besh anya rakom lugche(akhono obdhi)..
loke bole Vodka r Pink Floyd er combination naki osadharon..ami konodin seta try kore dekhini(jodio duto jinis alada alada try korechi botei)..kintu akhon ei 033 er Bangla gaan r Thumbs Up ei majh raat e besh enjoy korchi

Friday, April 16, 2010

Pteromechanophobia!!!

what is it actually?
To answer your question pteromechanophobia is nothing but fear of flying

Yesterday, when i was coming to kol in a spicy flight, i realized i am still not over the fear of flying 'fully'.Though the situation is better than my first time in a flight,but still some fear is there whenever its time to take off or land.

So, how do i handle the situation?Few common things come to my mind when the plane is about to take off - I have had a reasonably good life till now, I have a life insurance , I am sitting near the tail of the plane - so if it crashes the impact will be less here(no laughing please!),there are so many ppl around me - we'll die together (WOW!!).

At this point, i do a series of things in some random order -
1) look for a person who looks scared already(specially someone older than me)

2) some pretty faces (of the fairer sex)

3) some kid who is laughing unaware of the possible dangers of the current situation


All the above things serve different purposes:
point 1 - it helps me think i am not the only fool here

point 2 - helps me take my mind away :D

point 3 - try to learn few things from them


after doing all these things, i try to look as normal as possible so that the person sitting beside me doesn't think that i m scared.

now, sitting in my room, i cannot help but laugh at those silly emotions - but be rest assured, i would be doing the same thing again :)