You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by ma qiang <ma...@gmail.com> on 2008/01/31 12:30:35 UTC

how to set the output in map function directly to HBase?

Hi all:
    I want to set the output in map function directly to HBase when I
don't need reduce function?  I have used conf.setNumReduceTasks(0);
but the map function can't run any more.  Who can tell me how?
    Thanks very much!
    Best wishes!

Re: how to set the output in map function directly to HBase?

Posted by edward yoon <ed...@udanax.org>.
Just set up the output format and OUTPUT_TABLE.
Then, Not need a reduce.

Example :

    JobConf jobConf = new JobConf(conf);
    jobConf.setJobName("Your Job");

    YourMap.initJob("input_table"[, your options] , YourMap.class, jobConf);

    jobConf.setOutputFormat(TableOutputFormat.class);
    jobConf.set(TableOutputFormat.OUTPUT_TABLE, "output_table");

    jobConf.setNumMapTasks(50);
    JobClient.runJob(jobConf);


On 1/31/08, ma qiang <ma...@gmail.com> wrote:
> Hi all:
>    I want to set the output in map function directly to HBase when I
> don't need reduce function?  I have used conf.setNumReduceTasks(0);
> but the map function can't run any more.  Who can tell me how?
>    Thanks very much!
>    Best wishes!
>


-- 
B. Regards,
Edward yoon @ NHN, corp.