This file contains 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
#!/usr/bin/env python | |
import logging | |
log = logging.getLogger() | |
log.setLevel('INFO') | |
handler = logging.StreamHandler() | |
handler.setFormatter(logging.Formatter("%(asctime)s [%(levelname)s] %(name)s: %(message)s")) | |
log.addHandler(handler) |
This file contains 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
2014-03-11 11:12:45,428 [INFO] cassandra.cluster: New Cassandra host 127.0.0.3 added | |
2014-03-11 11:12:45,440 [INFO] cassandra.cluster: New Cassandra host 127.0.0.2 added | |
2014-03-11 11:12:45,748 [INFO] root: dropping existing keyspace... | |
2014-03-11 11:12:47,348 [INFO] root: creating keyspace... | |
2014-03-11 11:12:48,417 [INFO] root: setting keyspace... | |
2014-03-11 11:12:48,422 [INFO] root: creating table... | |
2014-03-11 11:12:50,103 [INFO] root: Insering row 0 | |
2014-03-11 11:12:54,919 [INFO] root: Insering row 1000 | |
2014-03-11 11:12:57,423 [INFO] root: Insering row 2000 | |
2014-03-11 11:12:59,734 [INFO] root: Insering row 3000 |
This file contains 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
DROP TABLE stats_teads; | |
CREATE TABLE stats_teads ( | |
dim text, | |
dimId text, | |
level text, | |
event text, | |
date text, | |
value int, | |
PRIMARY KEY ((dim, dimId, level, event), date) |
This file contains 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
383305 | |
383305 | |
383305 | |
383305 | |
383305 | |
383305 | |
ERROR: Unknown error connecting the server | |
Traceback (most recent call last): | |
File "/Users/alain/Teads/projects/admin-script-crons/lib/cassandraHelpers/cassandraHelpers.py", line 74, in ConnectAndOpenSession | |
session = cluster.connect(keyspace) |
This file contains 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
[...] | |
def forked_call(pagination_counts, pagination_standard, keys, timeout, num_nodes): | |
#Connection to Cassandra | |
connection = cassandraHelpers.ConnectAndOpenSession(timeout=timeout, executor_threads=num_nodes) | |
session = connection['session'] | |
print(len(keys)) | |
def go_threads(workers, keys, pagination_counts, pagination_standard, timeout, num_nodes): |
This file contains 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
INFO 11:41:35,589 Logging initialized | |
INFO 11:41:35,606 JVM vendor/version: Java HotSpot(TM) 64-Bit Server VM/1.6.0_38 | |
INFO 11:41:35,612 Heap size: 8422162432/8422162432 | |
INFO 11:41:35,612 Classpath: /usr/share/cassandra/lib/antlr-3.2.jar:/usr/share/cassandra/lib/avro-1.4.0-fixes.jar:/usr/share/cassandra/lib/avro-1.4.0-sources-fixes.jar:/usr/share/cassandra/lib/commons-cli-1.1.jar:/usr/share/cassandra/lib/commons-codec-1.2.jar:/usr/share/cassandra/lib/commons-lang-2.6.jar:/usr/share/cassandra/lib/compress-lzf-0.8.4.jar:/usr/share/cassandra/lib/concurrentlinkedhashmap-lru-1.3.jar:/usr/share/cassandra/lib/graphite-reporter-agent-1.0-SNAPSHOT.jar:/usr/share/cassandra/lib/guava-13.0.1.jar:/usr/share/cassandra/lib/high-scale-lib-1.1.2.jar:/usr/share/cassandra/lib/jackson-core-asl-1.9.2.jar:/usr/share/cassandra/lib/jackson-mapper-asl-1.9.2.jar:/usr/share/cassandra/lib/jamm-0.2.5.jar:/usr/share/cassandra/lib/jbcrypt-0.3m.jar:/usr/share/cassandra/lib/jline-1.0.jar:/usr/share/cassandra/lib/json-simple-1.1.jar:/usr/ |
This file contains 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
echo "SELECT rpc_address, release_version, schema_version FROM peers;" | cqlsh -ksystem | |
rpc_address | release_version | schema_version | |
-------------+-----------------+-------------------------------------- | |
null | 1.2.2 | 0443507f-7a35-370c-bcb1-2de90fa26c30 | |
0.0.0.0 | 1.2.11 | e6f8cc28-9ea6-31f9-b9b0-45b228206c9d | |
0.0.0.0 | 1.2.11 | e6f8cc28-9ea6-31f9-b9b0-45b228206c9d | |
0.0.0.0 | 1.2.11 | e6f8cc28-9ea6-31f9-b9b0-45b228206c9d | |
0.0.0.0 | 1.2.11 | e6f8cc28-9ea6-31f9-b9b0-45b228206c9d | |
null | 1.2.2 | 0443507f-7a35-370c-bcb1-2de90fa26c30 |
This file contains 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
[root@cass04 ~]# du -sh /mnt/cassandra/data/Telesto/DeviceImpressions-53cf1590475911e5bad7894bc771451d/* | sort -h | tail -6 | |
26G /mnt/cassandra/data/Telesto/DeviceImpressions-53cf1590475911e5bad7894bc771451d/Telesto-DeviceImpressions-ka-9310-Data.db | |
99G /mnt/cassandra/data/Telesto/DeviceImpressions-53cf1590475911e5bad7894bc771451d/Telesto-DeviceImpressions-ka-8374-Data.db | |
113G /mnt/cassandra/data/Telesto/DeviceImpressions-53cf1590475911e5bad7894bc771451d/Telesto-DeviceImpressions-ka-8714-Data.db | |
170G /mnt/cassandra/data/Telesto/DeviceImpressions-53cf1590475911e5bad7894bc771451d/Telesto-DeviceImpressions-ka-9063-Data.db | |
201G /mnt/cassandra/data/Telesto/DeviceImpressions-53cf1590475911e5bad7894bc771451d/Telesto-DeviceImpressions-ka-8146-Data.db | |
271G /mnt/cassandra/data/Telesto/DeviceImpressions-53cf1590475911e5bad7894bc771451d/Telesto-DeviceImpressions-ka-8084-Data.db | |
[root@cass04 ~]# du -sh /mnt/cassandra/data/Telesto*/* | sort -h | tail -6 | awk '{print $2}' | xargs /usr/local/apache-cassandra/tools/bin/sstab |
This file contains 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
alain$ grep -RiI CompactionThroughput . | |
./test/unit/org/apache/cassandra/cql3/validation/miscellaneous/CrcCheckChanceTest.java: DatabaseDescriptor.setCompactionThroughputMbPerSec(1); | |
./debian/nodetool-completion: getcompactionthroughput | |
./debian/nodetool-completion: setcompactionthroughput | |
./CHANGES.txt: * expose compactionThroughputMbPerSec through JMX (CASSANDRA-3117) | |
./CHANGES.txt: * fix nodetool setcompactionthroughput (CASSANDRA-2550) | |
./src/java/org/apache/cassandra/tools/nodetool/SetCompactionThroughput.java:@Command(name = "setcompactionthroughput", description = "Set the MB/s throughput cap for compaction in the system, or 0 to disable throttling") | |
./src/java/org/apache/cassandra/tools/nodetool/SetCompactionThroughput.java:public class SetCompactionThroughput extends NodeToolCmd | |
./src/java/org/apache/cassandra/tools/nodetool/SetCompactionThroughput.java: private Integer compactionThroughput = null; | |
./src/java/org/apache/cassandra/tools/nodetool/SetCompactionThroughput.j |