This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Create Keyspace// | |
| CREATE KEYSPACE petclinic WITH replication = {'class': 'SimpleStrategy', 'replication_factor' : '3'}; | |
| //Describe Keyspace// | |
| DESCRIBE KEYSPACE petclinic; | |
| USE petclinic; | |
| //Create 3 Tables// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| *// Create Keyspace* | |
| CREATE KEYSPACE superheros WITH replication = {'class':'SimpleStrategy', 'replication_factor' : '3'}; | |
| *// Create Table with Simple Primary Key* | |
| CREATE TABLE superheros.human_resources ( | |
| superhero_id uuid PRIMARY KEY, | |
| addr1 text, | |
| addr2 text, | |
| city text, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## THIS SCRIPT ASSUMES USING A SINGLE CLIENT TO RUN THE FULL TABLE SCAN ## | |
| ## Prerequisite: cassandra-driver installed (sudo pip install cassandra-driver) ## | |
| from multiprocessing.pool import ThreadPool | |
| from cassandra.cluster import Cluster | |
| #Your Scylla cluster setup# | |
| NODES_IN_CLUSTER = 3 | |
| CORES_IN_NODE = 8 | |
| SMUDGE_FACTOR = 3 |