Pig Rank function not generating rank in output

I am facing this bizarre issue while using Apache Pig rank utility. I am executing the following code:

email_id_ranked = rank email_id;
store email_id_ranked into '/tmp/';

So, basically I am trying to get the following result

1,email1
2,email2
3,email3
... 

Issue is sometime pig dumps the above result but sometimes it dumps only the emails without the rank. Also when I dump the data on screen using dump function pig returns both the columns. I don't know where the issue is. Kindly advice.

Please let me know if you need any more information. Thanks in advance.

Pig version: Apache Pig version 0.11.0-cdh4.6.0

Topic apache-pig apache-hadoop bigdata

Category Data Science

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.