hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Acosta Mitjans <amitj...@estudiantes.uci.cu>
Subject Mapreduce
Date Fri, 19 Apr 2013 17:16:45 GMT

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))
        } finally {
        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.

View raw message