Tushar:
I also tried that to make sure I wasnt going crazy, but it still did not
go through the if statement. I do not know why it is bypassing it. This is
very weird to me. Unless I have missed something, the logic should be
working.
Reza
> Could you try to things, just to further test your the
s/to things/two things/ ;)
Tushar
On Sun, Apr 19, 2009 at 6:20 PM, Tushar Jain wrote:
> Could you try to things, just to further test your theory that the
> equals is whats failing:
>
> 1. Log the value of the key (so the result of key.toString()), just to
> see what it is.
> 2. Do as below:
>
Could you try to things, just to further test your theory that the
equals is whats failing:
1. Log the value of the key (so the result of key.toString()), just to
see what it is.
2. Do as below:
Test sexKey = new Text("sex");
if(key.equals(sexKey)) {
.
.
}
These 2 should atleast help confirm or
Hey Brian:
I tried that as well, but to no avail . =[.
-Reza
> Hm,
>
> I don't know how equals() is implemented for Text, but I'd try:
>
> key.toString().equals("sex")
>
> Brian
>
> On Apr 19, 2009, at 11:29 AM, Reza wrote:
>
>> Brian:
>>
>> Thanks for your response.
>>
>> I have 8 total keys an
Hm,
I don't know how equals() is implemented for Text, but I'd try:
key.toString().equals("sex")
Brian
On Apr 19, 2009, at 11:29 AM, Reza wrote:
Brian:
Thanks for your response.
I have 8 total keys and values. The code I show below is part of the
whole
thing, just to illustrate my probl
Brian:
Thanks for your response.
I have 8 total keys and values. The code I show below is part of the whole
thing, just to illustrate my problem.
Im trying to call each key with an if statement (as in the piece I showed
before). Each of my 8 keys have their respective if statement.
However, it
Hey Reza,
From reading your code, you are calling this for the key "sex":
output.collect("The total population is: ", (actual population))
and, for every other key:
output.collect("The total population is: ", 0)
You probably only want to call the output collector in the first case,
not ever
Hello all:
I am new to Hadoop and Map Reduce. I am writing a program to analyze some
census data.
I have a general question with MapReduce:
In the Reducer, how can I separate keys to do separate calculations based
on the key? In my case, I am trying to use if statements to separate the
keys out,