Guest User

Untitled

a guest
May 26th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. <Keyspace Name="Test">
  2. <ColumnFamily Name="Aho1" />
  3. <ColumnFamily Name="Aho2" />
  4. <ReplicaPlacementStrategy>org.apache.cassandra.locator.RackUnawareStrategy</ReplicaPlacementStrategy>
  5. <ReplicationFactor>1</ReplicationFactor>
  6. <EndPointSnitch>org.apache.cassandra.locator.EndPointSnitch</EndPointSnitch>
  7. </Keyspace>
  8.  
  9. <ReplicaPlacementStrategy>org.apache.cassandra.locator.RackUnawareStrategy</ReplicaPlacementStrat\
  10. egy>
  11. <ReplicationFactor>1</ReplicationFactor>
  12. <EndPointSnitch>org.apache.cassandra.locator.EndPointSnitch</EndPointSnitch>
  13. </Keyspace>
  14.  
  15.  
  16. import jp.wota.scalamapper.storage._
  17. val aho1 = new StandardStorage("127.0.0.1", 9160, "Test", "Aho1")
  18. val aho2 = new StandardStorage("127.0.0.1", 9160, "Test", "Aho2")
  19. val rows = (1 to 1000000) map (_.toString)
  20.  
  21. for(row <- rows) aho1.set(row, "a", "1")
  22. for(row <- rows) aho2.set(row, "LongNameKey", "1")
  23.  
  24. drain
  25.  
  26. irb -r rubygems -r active_support
  27. Dir.glob("Aho1-*").map{|i| File.size(i)}.sum
  28. Dir.glob("Aho2-*").map{|i| File.size(i)}.sum
  29. 256344054
  30. 286344054
  31.  
  32.  
  33. import jp.wota.scalamapper.storage._
  34. val aho1 = new StandardStorage("127.0.0.1", 9160, "Test", "Aho1")
  35. val aho2 = new StandardStorage("127.0.0.1", 9160, "Test", "Aho2")
  36.  
  37. val rows = (1 to 1000000) map (_.toString)
  38. val keys1 = (0 to 9) map(_.toString)
  39. val keys2 = (0 to 9) map("LongNameKe" + _.toString)
  40.  
  41. for(row <- rows; key <-keys1) aho1.set(row, key, "1")
  42. for(row <- rows; key <-keys2) aho2.set(row, key, "1")
  43.  
  44. 418982686
  45. 922140428
Add Comment
Please, Sign In to add comment