hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Min Zhou <coderp...@gmail.com>
Subject Re: python client import error
Date Wed, 11 Mar 2009 10:29:11 GMT
It's okay now, thanks Raghu, I am a newbie of python,  learnt less than a
week.  :)

On Wed, Mar 11, 2009 at 5:23 PM, Raghu Murthy <raghu@facebook.com> wrote:

> The problem was a missing __init__.py in thrift/reflection directory. I
> have
> now created a patch with this file as well as the change to build.xml which
> will create a complete python package for hive in build/dist/lib/py. Once
> you do ant package, you should be able to import hive_service.ThriftHive if
> you have build/dist/lib/py in your PYTHONPATH.
>
> Again the usual thing about reverting the old patch before applying this
> new
> patch.
>
>
> On 3/11/09 12:44 AM, "Min Zhou" <coderplay@gmail.com> wrote:
>
> > the same error hadppend.
> > It's a bit weird that reported reflection.limited.ttypes, not
> > thrift.reflection.limited.ttypes.
> >
> >
> >
> > On Wed, Mar 11, 2009 at 3:34 PM, Raghu Murthy <raghu@facebook.com>
> wrote:
> >> Hi Min,
> >>
> >> That module didn't seem to be available in thrift open source version.
> But I
> >> am guessing that was a mistake. I have created a new patch with those
> >> modules included. Note that its a complete patch - so you would have to
> >> revert the changes from the first patch before you apply this patch. Let
> me
> >> know if this works.
> >>
> >> raghu
> >>
> >>
> >> On 3/10/09 10:43 PM, "Min Zhou" <coderplay@gmail.com> wrote:
> >>
> >>>> Hi Raghu,
> >>>>
> >>>> It still didnot work.
> >>>>
> >>>> Traceback (most recent call last):
> >>>>   File "./client.py", line 5, in <module>
> >>>>     from hive import ThriftHive
> >>>>   File
> "/home/zhoumin/taobao/hive/service/src/gen-py/hive/ThriftHive.py",
> >>> line
> >>>> 8, in <module>
> >>>>     import hive_metastore.ThriftHiveMetastore
> >>>>   File "/home/zhoumin/py/hive_metastore/ThriftHiveMetastore.py", line
> 8, in
> >>>> <module>
> >>>>     import fb303.FacebookService
> >>>>   File "/home/zhoumin/py/fb303/FacebookService.py", line 8, in
> <module>
> >>>>     from ttypes import *
> >>>>   File "/home/zhoumin/py/fb303/ttypes.py", line 8, in <module>
> >>>>     import thrift.reflection.limited.ttypes
> >>>> ImportError: No module named reflection.limited.ttypes
> >>>>
> >>>>
> >>>> On Wed, Mar 11, 2009 at 10:19 AM, Raghu Murthy <raghu@facebook.com>
> wrote:
> >>>>>> The python thrift files should be copied from the thrift
> distribution. I
> >>>>>> have now included them in the patch. Can you try after applying
the
> >>>> attached
> >>>>>> patch?
> >>>>>>
> >>>>>> raghu
> >>>>>>
> >>>>>>
> >>>>>> On 3/10/09 5:56 PM, "Min Zhou" <coderplay@gmail.com> wrote:
> >>>>>>
> >>>>>>>>>> When writting my client.
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> On Wed, Mar 11, 2009 at 9:44 AM, Prasad Chakka
<
> prasad@facebook.com>
> >>>>>>>>>> >>>>> wrote:
> >>>>>>>>>>>> How do you get this error? While starting
HiveServer?
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>> From: Min Zhou <coderplay@gmail.com
<http://coderplay@
> gmail.com
> >>>>>>>> <http://gmail.com>
> >>>>>>>>>> <http://gmail.com> > >
> >>>>>>>>>>>> Reply-To: <hive-user@hadoop.apache.org
> >>>>>>>>>> <http://hive-user@hadoop.apache.org <http://hadoop.apache.org>
> >>>>>> <http://hadoop.apache.org> > >
> >>>>>>>>>>>> Date: Tue, 10 Mar 2009 18:35:48 -0700
> >>>>>>>>>>>> To: <hive-user@hadoop.apache.org
> >>>>>>>> <http://hive-user@hadoop.apache.org <http://hadoop.apache.org>
> >>>>>>>>>> <http://hadoop.apache.org> > >
> >>>>>>>>>>>> Subject: python client import error
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>> Hi list,
> >>>>>>>>>>>>
> >>>>>>>>>>>>     It's seems Hive hasnot published
some modules python
> client
> >>>>>>>>>>>> relies
> >>>>>>>>>>>> on.
> >>>>>>>>>>>> e.g. ImportError: No module named fb303.FacebookService.
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>> Thanks,
> >>>>>>>>>>>> Min
> >>>>>>>>>>>> --
> >>>>>>>>>>>> My research interests are distributed
systems, parallel
> computing
> >>>>>>>>>>>> and
> >>>>>>>>>>>> bytecode
> >>>>>>>>>>>> based virtual machine.
> >>>>>>>>>>>>
> >>>>>>>>>>>> http://coderplay.javaeye.com
> >>>>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>
> >>>>
> >>>>
> >>
> >
> >
>
>


-- 
My research interests are distributed systems, parallel computing and
bytecode based virtual machine.

http://coderplay.javaeye.com

Mime
View raw message