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; | |
from psycopg2 import OperationalError, errorcodes, errors | |
import datetime; | |
import random; |
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
import os | |
import json | |
import time | |
from cassandra.cluster import Cluster, ExecutionProfile | |
cluster = Cluster(['127.0.0.1']) | |
profile = ExecutionProfile() | |
profile.request_timeout = 60 | |
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
File Edit Options Buffers Tools Python Help | |
# Dependencies: | |
# On CentOS you can install psycopg2 thus: | |
# | |
# sudo yum install postgresql-libs | |
# sudo yum install python-psycopg2 | |
import psycopg2; | |
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
# Dependencies: | |
# On CentOS you can install psycopg2 thus: | |
# | |
# sudo yum install postgresql-libs | |
# sudo yum install python-psycopg2 | |
import psycopg2 | |
from multiprocessing.dummy import Pool as ThreadPool | |
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
# Dependencies: | |
# On CentOS you can install psycopg2 thus: | |
# | |
# sudo yum install postgresql-libs | |
# sudo yum install python-psycopg2 | |
import psycopg2 | |
from threading import Thread,Semaphore | |
import random | |
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 | |
from cassandra import ConsistencyLevel | |
import time | |
import random | |
from multiprocessing.dummy import Pool as ThreadPool | |
# Load Phase params | |
num_offsets=10000 |
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
my_script() { | |
echo "=================================" | |
echo "Running with ysql_enable_packed_row=$1 and compression_type=$2" | |
./bin/yb-ctl stop | |
./bin/yb-ctl start --listen_ip=0.0.0.0 --tserver_flags="ysql_enable_packed_row=$1,compression_type=$2" | |
python ~/notes/wide_rows.py --num_write_threads $3 --num_rows_per_thread $4 --num_columns_per_row $5 $6 | |
./bin/yb-ts-cli -server_address=$IP:9100 flush_all_tablets | |
./bin/yb-ts-cli -server_address=$IP:9100 compact_all_tablets |
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
# Centos 7 dependencies: | |
# sudo yum install -y postgresql-libs python-psycopg2 | |
# | |
# For help: | |
# % python wide_rows.sql -h | |
# | |
# please fill out the connect string to connect it to a YugabyteDB instance. | |
import psycopg2 |
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 | |
import random | |
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
# Dependencies: | |
# On CentOS you can install psycopg2 thus: | |
# | |
# sudo yum install postgresql-libs | |
# sudo yum install python-psycopg2 | |
import psycopg2; | |
import datetime; | |
from multiprocessing.dummy import Pool as ThreadPool |
NewerOlder