Hi Riak Users

I have a 5 node cluster on my local dev machine, build from source in line
with http://docs.basho.com/riak/latest/quickstart/, and I am using a python
client (script) to migrate my data from PGSQL to riak.

When doing a key insert this is what I get:

Traceback (most recent call last):
  File "./migration.py", line 113, in <module>
    store_table_in_riak('trustpay_ops_development', 'bill')
  File "./migration.py", line 48, in store_table_in_riak
    key_set.store()
  File
"/usr/local/lib/python2.7/dist-packages/riak-2.2.0-py2.7.egg/riak/datatypes/datatype.py",
line 145, in update
  File
"/usr/local/lib/python2.7/dist-packages/riak-2.2.0-py2.7.egg/riak/client/operations.py",
line 1001, in update_datatype
  File
"/usr/local/lib/python2.7/dist-packages/riak-2.2.0-py2.7.egg/riak/transports/http/transport.py",
line 765, in update_datatype
  File
"/usr/local/lib/python2.7/dist-packages/riak-2.2.0-py2.7.egg/riak/transports/http/transport.py",
line 781, in check_http_code
riak.RiakError: 'Expected status [200, 201, 204], received 404'


I don't know what is not found and here is the script:

# Store Postgres table in Riak by row
def store_table_in_riak(database, table):
cursor = psycopg2.connect("dbname={} user=postgres password=postgres
host=172.17.0.1 port=5598".format(database)).cursor()
bucket = client.bucket(table)
key_set = Set(SETS_BUCKET, table)
cursor.execute("SELECT * FROM {} WHERE created_at <  DATE
('2015-03-01')".format(table))
rows = cursor.fetchall()
columns_list = list(get_table_columns(cursor, table))
for row in rows:
key = str(row[0])
user_dict = convert_row_to_dict(row, columns_list)
obj = riak.RiakObject(client, bucket, key)
obj.data = user_dict
obj.content_type = 'application/json'
obj.store()
key_set.add(key)
key_set.store()
cursor.close()

How can I troubleshoot the above issue as logs are not giving any info?
Your assistance in this will be highly appreciated.


Regards
Zipho
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to