hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xine Jar <xineja...@googlemail.com>
Subject Iinput path pointing on an hbase table and not a text file?
Date Fri, 07 Aug 2009 14:41:44 GMT
Hallo,
I am using hadoop 0.19.1 and I was previously writing my application setting
a text file as an input path for the job.
*
Therefore the main four involved parameters were the following:*

public static class Map extends MapReduceBase implements
Mapper<LongWritable, *Text*, Text, Text> {
.......
  public void map(LongWritable key,*Text value*, OutputCollector<Text, Text>
output, Reporter reporter) throws IOException {
....}
}

public static void main(String[] args) throws Exception {
....
    conf.setInputFormat(*TextInputFormat*.class);
    FileInputFormat.setInputPaths(conf, *new Path(args[0]*));

....
}

*Question
*I would like to write a mapreduce application that reads from an hbase
table, summing some values etc,...and writing the output result in a
textfile. I have already created this hbase table (using version 0.19.3) I
need now to pass it's name as an input path to the job how can I do it?

I have red here and there and found out that the InputFormat shall be set to
"*TableInputFormat.class*" but what about the setInputPaths ?and the Value
class in the mapper?

Thank you,
CJ

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message