You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Ruslan Salyakhov <ru...@gmail.com> on 2008/07/30 15:54:35 UTC

HBase MapReduce: wrong HStoreKey's row value passed into the map method

 Hi guys!
I'm running my MR job that based
on org.apache.hadoop.hbase.mapred.BuildTableIndex

//map method:
@Override

public void map(HStoreKey key, MapWritable value,

 OutputCollector<Text, MapWritable> output,

 Reporter reporter) throws IOException {

MapWritable mw = new MapWritable();

debug("row=" + HBaseUtils.utf8(key.getRow().getBytes()));

//debug("row=" + new String(key.getRow().getBytes())); //same output

...

}


For example, an input table has the following row's values:

afg-041005-010.jpg

web_afg_040405_001.jpg

6-F-2034C-010.jpg


debug output:

afg-041005-010.jpg

web_afg_040405_001.jpg

6-F-2034C-010.jpg1.jpg


Take a look at last row: "6-F-2034C-010.jpg1.jpg" - got unexpected suffix
"1.jpg" was arrived from the end of previous row.

There is some buffer that should be reset I guess.

Probably I'm doing something wrog...


Environment: hbase 0.1.2 and hadoop 0.16.4


Thanks an advance,


Ruslan

Re: HBase MapReduce: wrong HStoreKey's row value passed into the map method

Posted by Dru Jensen <dr...@gmail.com>.
I saw this behavior using the "Text" object in 0.1.3.  When I replaced  
it with "HStoreKey", it fixed my problem.  I haven't tried "Text" in  
0.2.0.

On Aug 4, 2008, at 1:52 PM, stack wrote:

> Thats odd Ruslan.  Were you able to figure out whats going on?  Any  
> chance of your upgrading to 0.1.3, or better, to the new 0.2.0 RC?
> St.Ack
>
> Ruslan Salyakhov wrote:
>> Hi guys!
>> I'm running my MR job that based
>> on org.apache.hadoop.hbase.mapred.BuildTableIndex
>>
>> //map method:
>> @Override
>>
>> public void map(HStoreKey key, MapWritable value,
>>
>> OutputCollector<Text, MapWritable> output,
>>
>> Reporter reporter) throws IOException {
>>
>> MapWritable mw = new MapWritable();
>>
>> debug("row=" + HBaseUtils.utf8(key.getRow().getBytes()));
>>
>> //debug("row=" + new String(key.getRow().getBytes())); //same output
>>
>> ...
>>
>> }
>>
>>
>> For example, an input table has the following row's values:
>>
>> afg-041005-010.jpg
>>
>> web_afg_040405_001.jpg
>>
>> 6-F-2034C-010.jpg
>>
>>
>> debug output:
>>
>> afg-041005-010.jpg
>>
>> web_afg_040405_001.jpg
>>
>> 6-F-2034C-010.jpg1.jpg
>>
>>
>> Take a look at last row: "6-F-2034C-010.jpg1.jpg" - got unexpected  
>> suffix
>> "1.jpg" was arrived from the end of previous row.
>>
>> There is some buffer that should be reset I guess.
>>
>> Probably I'm doing something wrog...
>>
>>
>> Environment: hbase 0.1.2 and hadoop 0.16.4
>>
>>
>> Thanks an advance,
>>
>>
>> Ruslan
>>
>>
>


Re: HBase MapReduce: wrong HStoreKey's row value passed into the map method

Posted by stack <st...@duboce.net>.
Thats odd Ruslan.  Were you able to figure out whats going on?  Any 
chance of your upgrading to 0.1.3, or better, to the new 0.2.0 RC?
St.Ack

Ruslan Salyakhov wrote:
>  Hi guys!
> I'm running my MR job that based
> on org.apache.hadoop.hbase.mapred.BuildTableIndex
>
> //map method:
> @Override
>
> public void map(HStoreKey key, MapWritable value,
>
>  OutputCollector<Text, MapWritable> output,
>
>  Reporter reporter) throws IOException {
>
> MapWritable mw = new MapWritable();
>
> debug("row=" + HBaseUtils.utf8(key.getRow().getBytes()));
>
> //debug("row=" + new String(key.getRow().getBytes())); //same output
>
> ...
>
> }
>
>
> For example, an input table has the following row's values:
>
> afg-041005-010.jpg
>
> web_afg_040405_001.jpg
>
> 6-F-2034C-010.jpg
>
>
> debug output:
>
> afg-041005-010.jpg
>
> web_afg_040405_001.jpg
>
> 6-F-2034C-010.jpg1.jpg
>
>
> Take a look at last row: "6-F-2034C-010.jpg1.jpg" - got unexpected suffix
> "1.jpg" was arrived from the end of previous row.
>
> There is some buffer that should be reset I guess.
>
> Probably I'm doing something wrog...
>
>
> Environment: hbase 0.1.2 and hadoop 0.16.4
>
>
> Thanks an advance,
>
>
> Ruslan
>
>