Sent from my Verizon Wireless BlackBerry
We are making an attempt at using ThriftBroker to insert data into Hypertable DB.
When used with mod_python (the code below),
#!/usr/bin/python
from mod_python import apache
from mod_python import util
import sys
sys.path.append('/var/www/html/insert')
sys.path.append('/var/www/html/insert/hypertable')
sys.path.append('/var/www/html/insert/hyperthrift')
from hypertable.thriftclient import *
from hyperthrift.gen.ttypes import *
def handler(req):
req.content_type = 'text/plain'
client = ThriftClient("192.168.0.153", 38080)
req.write( "HQL examples" )
req.write( client.hql_query("show tables") )
return apache.OK
the python ThriftClient for hypertable gives the following error:
MOD_PYTHON ERROR
ProcessId: 1504
Interpreter: '::1'
ServerName: '::1'
DocumentRoot: '/var/www/html'
URI: '/insert/insert.py'
Location: None
Directory: '/var/www/html/insert/'
Filename: '/var/www/html/insert/insert.py'
PathInfo: ''
Phase: 'PythonHandler'
Handler: 'insert'
Traceback (most recent call last):
File "/usr/lib64/python2.6/site-packages/mod_python/importer.py", line 1537, in
HandlerDispatch
default=default_handler, arg=req, silent=hlist.silent)
File "/usr/lib64/python2.6/site-packages/mod_python/importer.py", line 1229, in
_process_target
result = _execute_target(config, req, object, arg)
File "/usr/lib64/python2.6/site-packages/mod_python/importer.py", line 1128, in
_execute_target
result = object(arg)
File "/var/www/html/insert/insert.py", line 17, in handler
client = ThriftClient("192.168.0.153", 38080)
File "/var/www/html/insert/hypertable/thriftclient.py", line 17, in __init__
self.open(timeout_ms)
File "/var/www/html/insert/hypertable/thriftclient.py", line 20, in open
self.transport.open()
File "/usr/lib64/python2.6/site-packages/thrift/transport/TTransportpy", line 257, in open
return self.__trans.open()
File "/usr/lib64/python2.6/site-packages/thrift/transport/TSocket.py", line 89, in open
raise TTransportException(type=TTransportException.NOT_OPEN, message=message)
TTransportException: Could not connect to 192.168.0.153:38080
MODULE CACHE DETAILS
Accessed: Fri Jul 9 11:57:04 2010
Generation: 0
_mp_809b41c18fb5188389b7908e1f9234d3 {
FileName: '/var/www/html/insert/insert.py'
Instance: 1 [IMPORT]
Generation: 1
Modified: Thu Jul 8 18:34:23 2010
Imported: Fri Jul 9 11:57:04 2010
}
This exception is not raised when ThriftClient is used with the standard python interpreter.
Have you got any idea???
Regards,
Milko
On 5 Jul 2010 at 22:44, nugge...@gmail.com wrote:
>
> Hi Milko, This is great! I'm on vacation now. I'll check it out when I get back in about a week. -
> Doug
> Sent from my Verizon Wireless BlackBerry
>
> From: "Milko Marinov" <MMar...@ecs.uni-rusebg>
> Sender: hyperta...@googlegroups.com
> Date: Mon, 05 Jul 2010 19:17:15 +0300
> To: <hyperta...@googlegroups.com>
> ReplyTo: hyperta...@googlegroups.com
> Cc: <mmar...@ecs.uni-ruse.bg>; Vladimir Tochev<on.th...@gmail.com>;
> <jco...@hildebrand.co.uk>; <p...@manuf.uni-ruse.bg>
> Subject: [hypertable-user] Extension of HQL with aggregate operations
>
> Hi Doug,
>
> I’m pleased to be able to inform you that we managed to extend the HQL with aggregate
> operations (SUM, MIN, MAX, AVG, COUNT).
>
> As I mentioned several months ago we are using Hypertable DBMS into the DEHEMS project
> (look at: http://wwwdehems.eu/ and http://www.dehems.org ) to collect real time-series data.
--
The problem described bellow arises only with mod_python.
No problems with other interpreters.
Have got any idea?
Regards,
Milko
>> hypertable-us...@googlegroups.com<hypertable-user%2Bunsubscri
>> b...@googlegroups.com> .
>> For more options, visit this group at
>> http://groups.google.com/group/hypertable-user?hl=en.
>>
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Hypertable User" group.
> To post to this group, send email to hyperta...@googlegroups.com.
> To unsubscribe from this group, send email to
> hypertable-us...@googlegroups.com. For more options, visit this
> group at http://groups.google.com/group/hypertable-user?hl=en.
>
>
>