Guest User

Untitled

a guest
Sep 25th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. [default@unknown] connect localhost/9160;
  2. Connected to: "Test Cluster" on localhost/9160
  3. [default@unknown] create keyspace Foo;
  4. b2461b50-838a-11e1-0000-242d50cf1ffe
  5. Waiting for schema agreement...
  6. ... schemas agree across the cluster
  7. [default@unknown] use Foo;
  8. Authenticated to keyspace: Foo
  9. [default@Foo] CREATE COLUMN FAMILY mycf
  10. ... WITH column_type = 'Standard'
  11. ... AND comparator = UTF8Type
  12. ... AND key_validation_class = TimeUUIDType
  13. ... AND column_metadata = [
  14. ... {column_name: a, validation_class: IntegerType, index_type: KEYS,
  15. ... index_name: a}
  16. ... {column_name: b, validation_class: IntegerType, index_type: KEYS,
  17. ... index_name: b}
  18. ... {column_name: c, validation_class: IntegerType, index_type: KEYS,
  19. ... index_name: c }
  20. ... {column_name: d, validation_class: UTF8Type, index_type: KEYS,
  21. ... index_name: d }
  22. ... {column_name: e, validation_class: UTF8Type, index_type: KEYS,
  23. ... index_name: e }
  24. ... {column_name: f, validation_class: UTF8Type}
  25. ... ];
  26. c4110200-838a-11e1-0000-242d50cf1ffe
  27. Waiting for schema agreement...
  28. ... schemas agree across the cluster
  29. [default@Foo]
  30.  
  31. ~/pycassa $ ./pycassaShell -k Foo
  32. ----------------------------------
  33. Cassandra Interactive Python Shell
  34. ----------------------------------
  35. Keyspace: Foo
  36. Host: localhost:9160
  37.  
  38. Available ColumnFamily instances:
  39. * MYCF ( mycf )
  40.  
  41. Schema definition tools and cluster information are available through SYSTEM_MANAGER.
  42.  
  43. In [1]: from uuid import uuid1
  44.  
  45. In [2]: MYCF.insert(uuid1(), {'a': 1, 'b': 2, 'c': 3, 'd': 'd', 'e': 'e', 'f': 'f'})
  46. Out[2]: 1334116836032085
  47.  
  48. In [3]:
Add Comment
Please, Sign In to add comment