Guest User

Untitled

a guest
Jul 18th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. from globaldb import CASSANDRA_SERVER_LIST
  2. KEYSPACE = "Keyspace1"
  3. from lazyboy import connection
  4. from lazyboy.key import Key
  5. from lazyboy.record import Record
  6. from lazyboy.recordset import RecordSet,KeyRecordSet
  7. from cassandra.ttypes import ColumnParent,SliceRange,SlicePredicate,ConsistencyLevel
  8. Client(CASSANDRA_SERVER_LIST)
  9. connection.add_pool(KEYSPACE, CASSANDRA_SERVER_LIST)
  10. x = Record()
  11. x.key = Key(KEYSPACE, 'Supern1', 'inmyapp_623219793', 'inventory')
  12. x.load(x.key)
  13.  
  14.  
  15. Traceback (most recent call last):
  16. File "<stdin>", line 1, in <module>
  17. File "/home/mark/work/common/lazyboy/record.py", line 138, in load
  18. raise ErrorNoSuchRecord("No record matching key %s" % key)
  19. lazyboy.exceptions.ErrorNoSuchRecord: No record matching key {'column_family': 'Supern1', 'keyspace': 'Keyspace1', 'super_column': 'inventory', 'key': 'inmyapp_623219793'}
Add Comment
Please, Sign In to add comment