You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-user@hadoop.apache.org by Sai Sai <sa...@yahoo.in> on 2013/03/28 06:07:23 UTC

Re: Inspect a context object and see whats in it

I have put a break pt in map/reduce method and tried looking thru the context object by using the option inspect
i see a lot of variables inside it but wondering if it is possible to look at the contents in it meaningfully 
by contents i mean the keys and values only that we add at each step. 
Please let me know if you have suggestions.
Thanks
Sai

Re: Inspect a context object and see whats in it

Posted by Yanbo Liang <ya...@gmail.com>.
You can try to add some probes to source code and recompile it.
If you want to know the keys and values you add at each step, you can add
print code to map() function of class Mapper and reduce() function of class
Reducer.
The shortcoming is that you will produce many log output which may fill the
whole screen.

2013/3/28 Sai Sai <sa...@yahoo.in>

> I have put a break pt in map/reduce method and tried looking thru the
> context object by using the option inspect
> i see a lot of variables inside it but wondering if it is possible to look
> at the contents in it meaningfully
> by contents i mean the keys and values only that we add at each step.
> Please let me know if you have suggestions.
> Thanks
> Sai
>

Re: Inspect a context object and see whats in it

Posted by Yanbo Liang <ya...@gmail.com>.
You can try to add some probes to source code and recompile it.
If you want to know the keys and values you add at each step, you can add
print code to map() function of class Mapper and reduce() function of class
Reducer.
The shortcoming is that you will produce many log output which may fill the
whole screen.

2013/3/28 Sai Sai <sa...@yahoo.in>

> I have put a break pt in map/reduce method and tried looking thru the
> context object by using the option inspect
> i see a lot of variables inside it but wondering if it is possible to look
> at the contents in it meaningfully
> by contents i mean the keys and values only that we add at each step.
> Please let me know if you have suggestions.
> Thanks
> Sai
>

Re: Inspect a context object and see whats in it

Posted by Yanbo Liang <ya...@gmail.com>.
You can try to add some probes to source code and recompile it.
If you want to know the keys and values you add at each step, you can add
print code to map() function of class Mapper and reduce() function of class
Reducer.
The shortcoming is that you will produce many log output which may fill the
whole screen.

2013/3/28 Sai Sai <sa...@yahoo.in>

> I have put a break pt in map/reduce method and tried looking thru the
> context object by using the option inspect
> i see a lot of variables inside it but wondering if it is possible to look
> at the contents in it meaningfully
> by contents i mean the keys and values only that we add at each step.
> Please let me know if you have suggestions.
> Thanks
> Sai
>

Re: Inspect a context object and see whats in it

Posted by Yanbo Liang <ya...@gmail.com>.
You can try to add some probes to source code and recompile it.
If you want to know the keys and values you add at each step, you can add
print code to map() function of class Mapper and reduce() function of class
Reducer.
The shortcoming is that you will produce many log output which may fill the
whole screen.

2013/3/28 Sai Sai <sa...@yahoo.in>

> I have put a break pt in map/reduce method and tried looking thru the
> context object by using the option inspect
> i see a lot of variables inside it but wondering if it is possible to look
> at the contents in it meaningfully
> by contents i mean the keys and values only that we add at each step.
> Please let me know if you have suggestions.
> Thanks
> Sai
>