You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@giraph.apache.org by Inci Cetindil <ic...@gmail.com> on 2011/12/06 00:59:23 UTC

NullWritable causes IllegalAccessException

I was trying to use NullWritable as the type of my edge values. But it causes an IllegalAccessException when BspUtils.createEdgeValue() method tries to instantiate it; since NullWritable is Singleton with a private constructor. Is there a way to use NullWritable, or do I need to use another Writable?

Thanks,
Inci

Re: NullWritable causes IllegalAccessException

Posted by Avery Ching <ac...@apache.org>.
Seems fairly reasonable. =)

Avery

On 12/6/11 12:31 PM, Jake Mannix wrote:
> We could special-case NullWritable, and if that class is put into the 
> conf, instantiate it separately.  Seems like a common case if a user 
> wants to ignore something.
>
>   -jake
>
> On Mon, Dec 5, 2011 at 4:29 PM, Avery Ching <aching@apache.org 
> <ma...@apache.org>> wrote:
>
>     Actually, isn't that because the default constructor is private?
>      You probably need to write your own or subclass NullWritable with
>     a public default constructor.
>
>     Avery
>
>
>     On 12/5/11 3:59 PM, Inci Cetindil wrote:
>
>         I was trying to use NullWritable as the type of my edge
>         values. But it causes an IllegalAccessException when
>         BspUtils.createEdgeValue() method tries to instantiate it;
>         since NullWritable is Singleton with a private constructor. Is
>         there a way to use NullWritable, or do I need to use another
>         Writable?
>
>         Thanks,
>         Inci
>
>
>


Re: NullWritable causes IllegalAccessException

Posted by Jake Mannix <ja...@gmail.com>.
We could special-case NullWritable, and if that class is put into the conf,
instantiate it separately.  Seems like a common case if a user wants to
ignore something.

  -jake

On Mon, Dec 5, 2011 at 4:29 PM, Avery Ching <ac...@apache.org> wrote:

> Actually, isn't that because the default constructor is private?  You
> probably need to write your own or subclass NullWritable with a public
> default constructor.
>
> Avery
>
>
> On 12/5/11 3:59 PM, Inci Cetindil wrote:
>
>> I was trying to use NullWritable as the type of my edge values. But it
>> causes an IllegalAccessException when BspUtils.createEdgeValue() method
>> tries to instantiate it; since NullWritable is Singleton with a private
>> constructor. Is there a way to use NullWritable, or do I need to use
>> another Writable?
>>
>> Thanks,
>> Inci
>>
>
>

Re: NullWritable causes IllegalAccessException

Posted by Avery Ching <ac...@apache.org>.
Actually, isn't that because the default constructor is private?  You 
probably need to write your own or subclass NullWritable with a public 
default constructor.

Avery

On 12/5/11 3:59 PM, Inci Cetindil wrote:
> I was trying to use NullWritable as the type of my edge values. But it causes an IllegalAccessException when BspUtils.createEdgeValue() method tries to instantiate it; since NullWritable is Singleton with a private constructor. Is there a way to use NullWritable, or do I need to use another Writable?
>
> Thanks,
> Inci