RE: Text Iterable modifying other variable

2012-03-16 Thread Steven Willis
012 3:32 AM To: mapreduce-user@hadoop.apache.org Subject: Re: Text Iterable modifying other variable What Brock said. Also read Eric Sammers' response not too long ago on http://search-hadoop.com/m/Ok1JT1YABHb1 for some more info. On Thu, Mar 15, 2012 at 6:00 AM, Brock Noland wrote: > Wr

Re: Text Iterable modifying other variable

2012-03-16 Thread Harsh J
What Brock said. Also read Eric Sammers' response not too long ago on http://search-hadoop.com/m/Ok1JT1YABHb1 for some more info. On Thu, Mar 15, 2012 at 6:00 AM, Brock Noland wrote: > Writable's are reused.  You need to deep copy the "value" into "lastValue". > > On Wed, Mar 14, 2012 at 6:49 PM

Re: Text Iterable modifying other variable

2012-03-14 Thread Brock Noland
Writable's are reused. You need to deep copy the "value" into "lastValue". On Wed, Mar 14, 2012 at 6:49 PM, Steven Willis wrote: > I seem to have made a few typos in the code. This is how it should read: > > /*/ > public class MyReducer extends Reducer { >    @Override >    publi

RE: Text Iterable modifying other variable

2012-03-14 Thread Steven Willis
I seem to have made a few typos in the code. This is how it should read: /*/ public class MyReducer extends Reducer { @Override public void reduce(Text key, Iterable values, Reducer.Context context) throws IOException, InterruptedException { Text value = new Text();

Text Iterable modifying other variable

2012-03-14 Thread Steven Willis
I'm trying to write a Reducer which will eliminate duplicates from the list of values before writing them out. I have the following code for my Reducer: /*/ public class ClickStreamIndexerReducer extends Reducer { @Override public void reduce(Text dirName, Iterable values,