Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # user >> coprocessorExec got stucked with generic type


Copy link to this message
-
Re: coprocessorExec got stucked with generic type
Does your NameAndDistance class implement org.apache.hadoop.io.Writable?
 If so, it _should_ be serialized correctly.  There was a past issue
handling generic types in coprocessor endpoints, but that was fixed way
back (long before 0.94.2).  So, as far as I know, this should all be
working, assuming that NameAndDistance can be serialized.
On Mon, Jun 10, 2013 at 9:36 AM, Pavel Hančar <[EMAIL PROTECTED]>wrote:

>  It's org.apache.commons.lang.SerializationUtils
> I have it in hbase-0.94.2-cdh4.2.1/lib/commons-lang-2.5.jar
>  Pavel
>
>
> 2013/6/10 Ted Yu <[EMAIL PROTECTED]>
>
> > I searched for SerializationUtils class in hadoop (both branch-1 and
> > branch-2)
> > I also searched for SerializationUtils in hbase codebase.
> >
> > I didn't seem to find it.
> >
> > Is it an internal class of your project ?
> >
> > Cheers
> >
> > On Mon, Jun 10, 2013 at 6:11 AM, Pavel Hančar <[EMAIL PROTECTED]
> > >wrote:
> >
> > >  I see, that's probably big nonsense to return ArrayList (or array) of
> > > another classes from coprocessor, because it's a list of pointers. The
> > > solution is to serialize it to byte[] by SerializationUtils.serialize(
> > > Serializable<
> > >
> >
> http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true
> > > >
> > >  obj).
> > >   Pavel
> > >
> > >
> > > 2013/6/10 Pavel Hančar <[EMAIL PROTECTED]>
> > >
> > > >   Hello,
> > > > can I return from an EndPoint a generic type? I try to return
> > > > ArrayList<NameAndDistance> from an EndPoint method (where
> > NameAndDistance
> > > > is a simpe class with two public variables name and distance). But
> > when I
> > > > return  unempty ArrayList, the coprocessorExec get stucked.
> > > >   Thanks,
> > > >   Pavel Hančar
> > > >
> > >
> >
>