>
> new Path("/outputReadWrite"))

I am afraid are you running as root ?

On Thu, Nov 10, 2011 at 1:31 PM, Stuti Awasthi <[email protected]> wrote:

> Hi Tim,
>
> My Job driver class looks like this :
>
> Job job = new Job(config, "Hbase_Read_Write");
>                job.setJarByClass(ReadWriteDriver.class);
>                JobConf conf = new JobConf(ReadWriteDriver.class);
>
>                Scan scan = new Scan();
>                scan.setCaching(500);
>                scan.setCacheBlocks(false);
>
>                TableMapReduceUtil.initTableMapperJob("users", scan,
>                                ReadWriteMapper.class, Text.class,
> IntWritable.class, job);
>
>                job.setOutputFormatClass(TextOutputFormat.class);
>                FileOutputFormat.setOutputPath(conf, new
> Path("/outputReadWrite"));
>
>                boolean b;
>                try {
>                        b = job.waitForCompletion(true);
>                        if (!b) {
>                                throw new IOException("error with job!");
>                        }
>                } catch (InterruptedException e) {
>                        e.printStackTrace();
>                } catch (ClassNotFoundException e) {
>                        e.printStackTrace();
>                }
>
> But getting error :
>
> Exception in thread "main"
> org.apache.hadoop.mapred.InvalidJobConfException: Output directory not set.
>        at
> org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.checkOutputSpecs(FileOutputFormat.java:120)
>        at
> org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:770)
>        at org.apache.hadoop.mapreduce.Job.submit(Job.java:432)
>        at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:448)
>        at readwrite.ReadWriteDriver.main(ReadWriteDriver.java:46)
>
> -----Original Message-----
> From: Tim Robertson [mailto:[email protected]]
> Sent: Thursday, November 10, 2011 1:15 PM
> To: [email protected]
> Subject: Re: MR - Input from Hbase output to HDFS
>
> Hi Stuti,
>
> I would have thought it was something like:
>  conf.setOutputFormat(TextOutputFormat.class);
>  FileOutputFormat.setOutputPath(conf, new Path(<YOUR_LOCATION>));
>
> Cheers,
> Tim
>
>
>
>
> On Thu, Nov 10, 2011 at 8:31 AM, Stuti Awasthi <[email protected]>
> wrote:
> > Hi
> > Currently I am understading Hbase MapReduce support. I followed
> http://hbase.apache.org/book/mapreduce.example.html and executed it
> successfully.
> > But I am not sure what changes to be done to  MR which takes input from
> Hbase table and put output to HDFS.
> >
> > How to set output dir . I tried to set with JobConf but it gives me
> error that output directory is not set.
> > Please Suggest.
> >
> > Regards,
> > Stuti Awasthi
> > HCL Comnet Systems and Services Ltd
> > F-8/9 Basement, Sec-3,Noida.
> >
> >
> > ________________________________
> > ::DISCLAIMER::
> > ----------------------------------------------------------------------
> > -------------------------------------------------
> >
> > The contents of this e-mail and any attachment(s) are confidential and
> intended for the named recipient(s) only.
> > It shall not attach any liability on the originator or HCL or its
> > affiliates. Any views or opinions presented in this email are solely
> those of the author and may not necessarily reflect the opinions of HCL or
> its affiliates.
> > Any form of reproduction, dissemination, copying, disclosure,
> > modification, distribution and / or publication of this message
> > without the prior written consent of the author of this e-mail is
> > strictly prohibited. If you have received this email in error please
> delete it and notify the sender immediately. Before opening any mail and
> attachments please check them for viruses and defect.
> >
> > ----------------------------------------------------------------------
> > -------------------------------------------------
> >
>

Reply via email to