Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
HDFS >> mail # user >> Re: Mapreduce


As this is a HBase specific question, it will be better to ask this
question on the HBase user mailing list.

Thanks
Hemanth
On Fri, Apr 19, 2013 at 10:46 PM, Adrian Acosta Mitjans <
[EMAIL PROTECTED]> wrote:

> 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.
>
> Thanks.
>   <http://www.uci.cu/>
>
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB