You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Sandy <sn...@gmail.com> on 2008/07/11 21:33:01 UTC

hadoop Writeable class conversions

Hello,

Just a quick question. Suppose I have a value y that is of type
LongWritable. How can I convert it to a long? I tried casting, and I also
looked at the LongWritable class and did not see a definition for a suitable
conversion function. I also was not able to find a solution through the
forum archives. Could someone please point me in the right direction?

Much thanks.

-SM

Re: hadoop Writeable class conversions

Posted by Sandy <sn...@gmail.com>.
... WOW. I can't believe I missed that! Thanks. I think I've been staring at
my code for too long.

-SM

On Fri, Jul 11, 2008 at 3:16 PM, Chris Douglas <ch...@yahoo-inc.com>
wrote:

>
> http://hadoop.apache.org/core/docs/current/api/org/apache/hadoop/io/LongWritable.html#get()<http://hadoop.apache.org/core/docs/current/api/org/apache/hadoop/io/LongWritable.html#get%28%29>
>
> -C
>
>
> On Jul 11, 2008, at 12:33 PM, Sandy wrote:
>
>  Hello,
>>
>> Just a quick question. Suppose I have a value y that is of type
>> LongWritable. How can I convert it to a long? I tried casting, and I also
>> looked at the LongWritable class and did not see a definition for a
>> suitable
>> conversion function. I also was not able to find a solution through the
>> forum archives. Could someone please point me in the right direction?
>>
>> Much thanks.
>>
>> -SM
>>
>
>

Re: hadoop Writeable class conversions

Posted by Chris Douglas <ch...@yahoo-inc.com>.
http://hadoop.apache.org/core/docs/current/api/org/apache/hadoop/io/LongWritable.html#get()

-C

On Jul 11, 2008, at 12:33 PM, Sandy wrote:

> Hello,
>
> Just a quick question. Suppose I have a value y that is of type
> LongWritable. How can I convert it to a long? I tried casting, and I  
> also
> looked at the LongWritable class and did not see a definition for a  
> suitable
> conversion function. I also was not able to find a solution through  
> the
> forum archives. Could someone please point me in the right direction?
>
> Much thanks.
>
> -SM