hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 정종운 <sharp...@gmail.com>
Subject Re: Mapreduce
Date Mon, 22 Apr 2013 02:43:27 GMT
http://hbase.apache.org/book/mapreduce.example.html


2013/4/20 Hemanth Yamijala <yhemanth@thoughtworks.com>

> 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 <
> amitjans@estudiantes.uci.cu> 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/>
>>
>>
>

Mime
View raw message