Here you have several examples: http://hbase.apache.org/book/mapreduce.example.html http://sujee.net/tech/articles/hadoop/hbase-map-reduce-freq-counter/ http://bigdataprocessing.wordpress.com/2012/07/27/hadoop-hbase-mapreduce-examples/ http://stackoverflow.com/questions/12215313/load-data-into-hbase-table-using-hbase-map-reduce-api
2013/4/21 Adrian Acosta Mitjans <[email protected]> > Hello: > > I'm working in a proyect, and i'm using hbase for storage > the data, y have this method that work great but without the performance > i'm looking for, so i want is to make the same but using mapreduce. > > > public ArrayList<MyObject> findZ(String z) throws IOException { > > ArrayList<MyObject> rows = new ArrayList<MyObject>(); > Configuration conf = HBaseConfiguration.create(); > HTable table = new HTable(conf, "test"); > Scan s = new Scan(); > s.addColumn(Bytes.toBytes("x"), Bytes.toBytes("y")); > ResultScanner scanner = table.getScanner(s); > try { > for (Result rr : scanner) { > if (Bytes.toString(rr.getValue(Bytes.toBytes("x"), > Bytes.toBytes("y"))).equals(z)) { > rows.add(getInformation(Bytes.toString(rr.getRow()))); > } > } > } finally { > scanner.close(); > } > return archivos; > } > > the getInformation method take all the columns and convert the row in > MyObject type. > > I > just want a example or a link to a tutorial that make something like > this, i want to get a result type as answer and not a number to count > words, like many a found. > My natural language is spanish, so sorry if something is not well writing. > > Thanths > http://www.uci.cu -- Marcos Ortiz Valmaseda, *Data-Driven Product Manager* at PDVSA *Blog*: http://dataddict.wordpress.com/ *LinkedIn: *http://www.linkedin.com/in/marcosluis2186 *Twitter*: @marcosluis2186 <http://twitter.com/marcosluis2186>
