how to access Mapper Counter value in a Reducer?

One Star

how to access Mapper Counter value in a Reducer?

I want to acces the myCounter.my value in reducer :

public static class Map extends Mapper<LongWritable, Text, ImmutableBytesWritable, ImmutableBytesWritable>
{
public static enum myCounter{my};

@Override
public void map(LongWritable key, Text value, Context context)
{
context.getCounter(myCounter.my).increment(1);
context.write( new ImmutableBytesWritable ( ),new ImmutableBytesWritable() );
}
}


public static class Reduce extends Reducer<ImmutableBytesWritable, ImmutableBytesWritable, Text, Text>
{
@Override
public void reduce(ImmutableBytesWritable key,Iterable<ImmutableBytesWritable> result,Context context)
{

}
}

how to make it work for new API(hadoop 0.20.0 API) ?
**Or**
I want to know the total number of mapper output ? Is there any better way ? (i am not able to access counter in Reducer:
`Group Name->org.apache.hadoop.mapred.Task$Counter Counter Name->MAP_OUTPUT_RECORDS`)

Thanks
One Star

Re: how to access Mapper Counter value in a Reducer?

Hi,

How come you could execute map reduce using talend? Is it by using tLibraryLoad and tJava? Is there any other way?
One Star

Re: how to access Mapper Counter value in a Reducer?

Hi ,,
I want to know is there any way to perform map-reduce for weblog data in talend vig data v.5.2.1
Thanks
Employee

Re: how to access Mapper Counter value in a Reducer?

Hi
What's the use-case? Talend tries to avoid the need to write map-reduce code through abstraction the transformation into a set of graphical components.
Have you reviewed the Talend Youtube big data videos?
http://www.youtube.com/user/TalendChannel?feature=g-high-u

Ciaran