etNumReduceTasks(0);
> > >
> > > FileInputFormat.setInputPaths(job, new Path("test"));
> > > Path outputPath = new Path("test_output");
> > > FileOutputFormat.setOutputPath(job,outputPath);
> > >
>
FileOutputFormat.setOutputPath(job,outputPath);
> >
> > //outputPath.getFileSystem(conf).delete(outputPath, true);
> >
> > job.waitForCompletion(true);
> > System.out.println("Done");
> > }
> >
> >
> > I am getting
("test"));
> Path outputPath = new Path("test_output");
> FileOutputFormat.setOutputPath(job,outputPath);
>
> //outputPath.getFileSystem(conf).delete(outputPath, true);
>
> job.waitForCompletion(true);
> System.out.println
t; job.setMapOutputValueClass(Put.class);
> > > job.setInputFormatClass(SequenceFileInputFormat.class);
> > > //job.setNumReduceTasks(0);
> > >
> > > FileInputFormat.setInputPaths(job, new Path("test"));
> > > Path outp
InputPaths(job, new Path("test"));
> > Path outputPath = new Path("test_output");
> > FileOutputFormat.setOutputPath(job,outputPath);
> >
> > //outputPath.getFileSystem(conf).delete(outputPath, true);
> >
> > job.wait
;test_output");
> FileOutputFormat.setOutputPath(job,outputPath);
>
> //outputPath.getFileSystem(conf).delete(outputPath, true);
>
> job.waitForCompletion(true);
> System.out.println("Done");
> }
>
>
am getting the following error while running. Any help/guidance:
java.io.IOException: Type mismatch in value from map: expected
org.apache.hadoop.hbase.client.Put, recieved
org.apache.hadoop.io.BytesWritable
at
org.apache.hadoop.mapred.MapTask$MapOutputBuffer.collect(MapTask.java:1023)
at
or
pendencyJars(job);
> >>
> >> FileOutputFormat.setOutputPath(job, new Path(args[1]));
> >>
> >>
> >>return job.waitForCompletion(true)? 0:1 ;
> >> }
> >>
> >> When i try to execute the job, i am getting following error. I don't
gt;> }
>>
>> When i try to execute the job, i am getting following error. I don't
>>know
>> what is the mistake.For what the LongWritable it is expected?
>>
>> 12/01/28 11:57:23 INFO mapred.JobClient: map 0% reduce 0%
>> 12/01
cute the job, i am getting following error. I don't know
> what is the mistake.For what the LongWritable it is expected?
>
> 12/01/28 11:57:23 INFO mapred.JobClient: map 0% reduce 0%
> 12/01/28 11:57:34 INFO mapred.JobClient: Task Id :
> attempt_201201281010_0004_m_00_0,
mapred.JobClient: Task Id :
attempt_201201281010_0004_m_00_0, Status : FAILED
java.io.IOException: Type mismatch in key from map: expected
org.apache.hadoop.io.LongWritable, recieved
org.apache.hadoop.hbase.io.ImmutableBytesWritable
at
org.apache.hadoop.mapred.MapTask$MapOutputBuffer.collect
ERROR org.mortbay.log: /Tables1/xxx
java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.
at
>> >> >> >
>> >> org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:258)
>> >> >> >
>> >> >> > On Thu, Feb 3, 2011 at 11:52 PM, Stack wrote:
>> >> >> >
>> &
gt; >> St.Ack
> >> >> >>
> >> >> >> On Thu, Feb 3, 2011 at 9:36 PM, Mark Kerzner <
> markkerz...@gmail.com>
> >> >> >> wrote:
> >> >> >> > Thank you, that helped, but now I get this er
> >> >> >> >Reducer.Context context)
> >> >> >> >throws IOException,
> >> >> >> >InterruptedException {
> >> >> >> >Iterator iterator = values.iterato
ut
>> >> >> >
>> >> >> > Here is a fragment on my code. Again, thanks a bunch!
>> >> >> >
>> >> >> > public static class RowCounterReducer
>> >> >> > extends TableReducer
>&g
t;> >{
> >> >> >public void reduce(Text key,
> >> >> >Iterable values,
> >> >> >Reducer.Context context)
> >> >> >throws IOException,
> >> >> >
gt;> >> > throws IOException,
>> >> > InterruptedException {
>> >> > Iterator iterator = values.iterator();
>> >> > while (iterator.hasNext()) {
>> >> >
InterruptedException {
> >> >Iterator iterator = values.iterator();
> >> >while (iterator.hasNext()) {
> >> >IntWritable value = iterator.next();
> >> > Put put = new Put();
> >> >
> >> >while (iterator.hasNext()) {
> >> >IntWritable value = iterator.next();
> >> > Put put = new Put();
> >> >context.write(key, put);
> >> >}
> >> >}
> >>
Feb 3, 2011 at 2:50 PM, Stack wrote:
>> >
>> >> You are emitting a Text type. Try just passing 'row' to the context,
>> >> the one passed in to your map.
>> >> St.Ack
>> >>
>> >> On Thu, Feb 3, 2011 at 12:23 PM, Mark K
ing 'row' to the context,
> >> the one passed in to your map.
> >> St.Ack
> >>
> >> On Thu, Feb 3, 2011 at 12:23 PM, Mark Kerzner
> >> wrote:
> >> > Hi,
> >> >
> >> > I have this code to read
gt;>
>> On Thu, Feb 3, 2011 at 12:23 PM, Mark Kerzner
>> wrote:
>> > Hi,
>> >
>> > I have this code to read and write to HBase from MR, and it works fine
>> with
>> > 0 reducers, but it gives a type mismatch error when with 1 reducer. What
&g
On Thu, Feb 3, 2011 at 12:23 PM, Mark Kerzner
> wrote:
> > Hi,
> >
> > I have this code to read and write to HBase from MR, and it works fine
> with
> > 0 reducers, but it gives a type mismatch error when with 1 reducer. What
> > should I look at? *Thank y
You are emitting a Text type. Try just passing 'row' to the context,
the one passed in to your map.
St.Ack
On Thu, Feb 3, 2011 at 12:23 PM, Mark Kerzner wrote:
> Hi,
>
> I have this code to read and write to HBase from MR, and it works fine with
> 0 reducers, but it gives
Hi,
I have this code to read and write to HBase from MR, and it works fine with
0 reducers, but it gives a type mismatch error when with 1 reducer. What
should I look at? *Thank you!*
*Code:*
static class RowCounterMapper
extends TableMapper {
private static enum
26 matches
Mail list logo