View Logs_from_SSDC-to_Elasticsearch_and_Cassandra.json
{ | |
"pipelineConfig" : { | |
"schemaVersion" : 6, | |
"version" : 16, | |
"pipelineId" : "LogsfromSSDCtoElasticsearch42654be3-3013-4bc0-b981-75e066aec41c", | |
"title" : "Logs_from_SSDC_to_Elasticsearch_and_Cassandra", | |
"description" : "Pipeline from tutorial 1", | |
"uuid" : "cbbbfff6-4a1a-4548-b623-3f452c816502", | |
"configuration" : [ { | |
"name" : "executionMode", |
View ibeacon_consumer.py
# iBeacon Consumer simulator for Aiven Kafka | |
# This script receives messages from a Kafka topic | |
# usage: python ibeacon_consumer.py | |
# jammink@aiven.io | |
from kafka import KafkaConsumer | |
from time import sleep | |
# method that receives the message | |
# be sure to copy your ca.pem, service.cert and service.key to local directory from your Aiven Kafka instance. |
View ibeacon_producer.py
# iBeacon Producer simulator for Aiven Kafka | |
# This script takes, as an argument, the number of messages you want to iterate on. | |
# example usage: python ibeacon.py 50000 | |
# to run continuously, try: clear && python ibeacon_producer.py 5000000 | |
# jammink@aiven.io | |
from kafka import KafkaProducer | |
import sys, random, string, os | |
from time import sleep |
View load_json.py
# loads json files into Elasticsearch | |
# borrowed heavily from http://carrefax.com/new-blog/2018/3/12/load-json-files-into-elasticsearch | |
import requests, json, os | |
from elasticsearch import Elasticsearch | |
# specify a directory | |
directory = str(os.getcwd()) | |
# connect to Elasticsearch; by default, ES listens on port 9200 |
View gist:2c08f4697d1baf76a4d652c4d6d4030c
********************************* | |
### Step one: bring up the cluster | |
asciinema rec | |
docker run --name Node_X -d scylladb/scylla | |
docker exec -it Node_X nodetool status |
View Scylla Tracing Output 1
cqlsh> TRACING ON | |
Now Tracing is enabled | |
cqlsh> INSERT into keyspace1.standard1 (key, "C0") VALUES (0x12345679, bigintAsBlob(123456)); | |
Tracing session: 227aff60-4f21-11e6-8835-000000000000 | |
activity | timestamp | source | source_elapsed | |
-------------------------------------------------------------------------+----------------------------+-----------+---------------- | |
Execute CQL3 query | 2016-07-21 11:57:21.238000 | 127.0.0.2 | 0 | |
Parsing a statement [shard 1] | 2016-07-21 11:57:21.238335 | 127.0.0.2 | 1 |
View Scylla tracing output 2
cqlsh> TRACING ON | |
Now Tracing is enabled | |
cqlsh> INSERT into keyspace1.standard1 (key, "C0") VALUES (0x12345679, bigintAsBlob(123456)); | |
Tracing session: 227aff60-4f21-11e6-8835-000000000000 | |
activity | timestamp | source | source_elapsed | |
-------------------------------------------------------------------------+----------------------------+-----------+---------------- | |
Execute CQL3 query | 2016-07-21 11:57:21.238000 | 127.0.0.2 | 0 | |
Parsing a statement [shard 1] | 2016-07-21 11:57:21.238335 | 127.0.0.2 | 1 |
View Scylla tracing output 2
cqlsh> TRACING ON | |
Now Tracing is enabled | |
cqlsh> INSERT into keyspace1.standard1 (key, "C0") VALUES (0x12345679, bigintAsBlob(123456)); | |
Tracing session: 227aff60-4f21-11e6-8835-000000000000 | |
activity | timestamp | source | source_elapsed | |
-------------------------------------------------------------------------+----------------------------+-----------+---------------- | |
Execute CQL3 query | 2016-07-21 11:57:21.238000 | 127.0.0.2 | 0 | |
Parsing a statement [shard 1] | 2016-07-21 11:57:21.238335 | 127.0.0.2 | 1 |
View Tracing Output
cqlsh> select * from system_traces.sessions where session_id=227aff60-4f21-11e6-8835-000000000000; | |
session_id | client | command | coordinator | duration | parameters | request | started_at | |
--------------------------------------+-----------+---------+-------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------+--------------------------------- | |
227aff60-4f21-11e6-8835-000000000000 | 127.0.0.1 | QUERY | 127.0.0.2 | 639 | {'consistency_level': 'ONE', 'page_size': '100', 'query': 'INSERT into keyspace1.standard1 (key, "C0") VALUES (0x12345679 |
View cp_transactions_2.sql
-- second console | |
set schema CP; | |
select * from DOMAIN_DATA; | |
-- table doesn't exist in this session yet, therefore | |
-- ERROR 42X05: Table/View 'DOMAIN_DATA' does not exist. | |
-- switch to first console, commit changes |
NewerOlder