You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Allen Day <al...@gmail.com> on 2008/08/28 02:39:53 UTC
Need some help? LongWritable cast to Text Error
Hi, I'm new to the list.
I'm getting the same error described in this thread:
http://markmail.org/message/sfnjtuzfsqxpprvv
and under similar circumstance, i.e. I am not referring to
LongWritable anywhere in my class.
I've tried modifying my map() method to accept a LongWritable or
WritableComparable as the
argument type, but that conflicts with the TableMap signature so it
won't compile.
Can someone explain to me what's going on here?
-Allen
Re: Need some help? LongWritable cast to Text Error
Posted by stack <st...@duboce.net>.
You are using TextInputFormat?
It makes records whose key is of type LongWritable and value Text. In 0.1.x
hbase -- which you seem to be using -- TableMap takes keys of type Text and
values of type Text. There's a type mismatch that needs resolving. Subtype
TIF so you make records whose key is of type Text instead?
In 0.2.0 hbase, TableMap has been changed. Instead it takes keys of type
ImmutableBytesArray. Would still need to make a subclass of TIF that did
the necessary conversion.
I suppose hbase should bundle a TIF that outputs TableMap-appropriate
records?
St.Ack
On Wed, Aug 27, 2008 at 5:39 PM, Allen Day <al...@gmail.com> wrote:
> Hi, I'm new to the list.
>
> I'm getting the same error described in this thread:
> http://markmail.org/message/sfnjtuzfsqxpprvv
> and under similar circumstance, i.e. I am not referring to
> LongWritable anywhere in my class.
>
> I've tried modifying my map() method to accept a LongWritable or
> WritableComparable as the
> argument type, but that conflicts with the TableMap signature so it
> won't compile.
>
> Can someone explain to me what's going on here?
>
> -Allen
>