hydro-project / fluent

A data-driven compute platform
Apache License 2.0
1.22k stars 173 forks source link

python client causes fluentkvs to segfault #51

Closed mogorman closed 5 years ago

mogorman commented 5 years ago

i am trying to run fluentkvs and perform a query on it using the included python client it crashes on all get and put queries

# ./build/kvs/src/kvs/flkvs
No server type specified. The default behavior is to start the server in memory mode.
terminating with uncaught exception of type std::invalid_argument: stoi: no conversion
Aborted (core dumped)
#!bin/env python

from  anna.client import AnnaClient

anna_client = AnnaClient("localhost",ip="127.0.0.1")

anna_client.get("a")
anna_client.put("1","2")
print("hello there")
vsreekanti commented 5 years ago

Hi @mogorman, currently the Python client is only set to run against an AWS cluster. The ports it's set to run against are the ports the Elastic Load Balancer listens on. I'll have a PR to fix this soon. In the meantime, if you want to use the Python client, please do the following:

  1. In the Python client, change the ELB_PORTS list to be ELB_PORTS = [6450,].
  2. Run ./scripts/start-kvs-local.sh.

That should let you use the client locally. Sorry for the confusion, and thanks for pointing this out!

mogorman commented 5 years ago

thanks @vsreekanti that solved my problem I will make a port parameter for the python library. one thing that surprised me was that variables i put in via the flkvs-cli aren't visible to python code, and vice versa.

mogorman commented 5 years ago

https://github.com/fluent-project/fluent/pull/52

vsreekanti commented 5 years ago

Thanks for the PR, @mogorman! I didn't understand the second part of your previous message:

one thing that surprised me was that variables i put in via the flkvs-cli aren't visible to python code, and vice versa.

Is this still a problem you're facing? If so, would you mind expanding?