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
# Dependencies: | |
# On CentOS you can install psycopg2 thus: | |
# | |
# sudo yum install postgresql-libs | |
# sudo yum install python-psycopg2 | |
import psycopg2; | |
import time; | |
from datetime import datetime | |
from multiprocessing.dummy import Pool as ThreadPool |
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
# pip install yb-cassandra-driver | |
from cassandra.cluster import Cluster | |
import time | |
import random | |
from multiprocessing.dummy import Pool as ThreadPool | |
from functools import partial | |
# Load Phase params | |
num_write_threads=2 |
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
# sudo pip3 install pandas | |
# sudo pip3 install sqlalchemy | |
# sudo pip3 install psycopg2 | |
# Imports | |
import pandas as pd | |
from sqlalchemy import create_engine | |
import psycopg2; | |
import time |
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
# pip install yb-cassandra-driver | |
from cassandra.cluster import Cluster | |
import time | |
import random | |
from multiprocessing.dummy import Pool as ThreadPool | |
from functools import partial | |
# Load Phase params | |
num_write_threads=2 |
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
# pip install yb-cassandra-driver | |
from cassandra.cluster import Cluster | |
from cassandra.cluster import ResultSet | |
import time | |
import random | |
import os | |
from functools import partial | |
from multiprocessing.dummy import Pool as ThreadPool |
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
# pip install yb-cassandra-driver | |
from cassandra.cluster import Cluster | |
# cluster = Cluster(['127.0.0.1']) | |
cluster = Cluster(['172.151.30.71', '172.151.28.193']) | |
num_checks_per_table=64 | |
keyspace_name="ybdemo_keyspace" |
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
# Dependencies: | |
# On CentOS you can install psycopg2 thus: | |
# | |
# sudo yum install postgresql-libs | |
# sudo yum install python-psycopg2 | |
import psycopg2; | |
import time; | |
from datetime import datetime | |
from multiprocessing.dummy import Pool as ThreadPool |
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
# pip install yb-cassandra-driver | |
from cassandra.cluster import Cluster | |
from cassandra.auth import PlainTextAuthProvider | |
import time | |
import random | |
from multiprocessing.dummy import Pool as ThreadPool | |
num_sessions=10 |
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
<?php | |
$ip = '127.0.0.1'; | |
$cluster = Cassandra::cluster() | |
->withDefaultConsistency(Cassandra::CONSISTENCY_QUORUM) | |
->withContactPoints($ip) | |
->build(); | |
$session = $cluster->connect(); |
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
<?php | |
$ip = '127.0.0.1'; | |
$cluster = Cassandra::cluster() | |
->withDefaultConsistency(Cassandra::CONSISTENCY_QUORUM) | |
->withContactPoints($ip) | |
->build(); | |
$session = $cluster->connect(); |