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
# Stress profile to test for CASSANDRA-10657 | |
keyspace: ks | |
keyspace_definition: | | |
CREATE KEYSPACE ks WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; | |
table: tbl | |
table_definition: | |
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
"""Simple Data loader. | |
Usage: | |
insert_bigsavings.py [-c] [-n=<x>] [-p=<y>] | |
Options: | |
-c enable compression (disabled by default) | |
-n=<x> total number of rows to insert (default: 1M) | |
-p=<y> number of partitions to insert the row into (default: 100) | |
""" |
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
"""Simple Data loader. | |
Usage: | |
insert_smallsavings.py [-c] [-n=<x>] | |
Options: | |
-c enable compression (disabled by default) | |
-n=<x> total number of rows to insert (default: 1M) | |
""" | |
from __future__ import print_function |
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
"""Simple Data loader. | |
Usage: | |
insert.py [-c] [-n=<x>] [-p=<y>] | |
Options: | |
-c enable compression (disabled by default) | |
-n=<x> total number of rows to insert (default: 1M) | |
-p=<y> number of partitions to insert the row into (default: 100) | |
""" |
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
# Command line suggestions | |
# user | |
# ops(insert=100,latest=100,point=10,range=1) | |
# n=1B | |
# -rate threads=50 | |
# -pop seq=1..1M | |
# contents=SORTED | |
# read-lookback=uniform(1..1M) | |
# -insert visits=fixed(100K) | |
# revisit=uniform(1..1M)" |
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
MutationBuilder.create(metadata) | |
.newRow(4, "foo", 3.2).add("value", 0) | |
.newRow(4, "bar", 3.2).add("value", 0) | |
.apply(); |
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
/* | |
* Copyright (C) 2012 DataStax Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
package batchInsertTest; | |
import com.datastax.driver.core.*; | |
public class BatchInsertTest { | |
public static void main(String[] args) throws Exception { | |
int RUN = 20; | |
int PER_BATCH_INSERTS = 10000; |