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
{ | |
"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", |
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
# iBeacon Consumer simulator for Aiven Kafka | |
# This script receives messages from a Kafka topic | |
# usage: python ibeacon_consumer.py | |
# [email protected] | |
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. |
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
# 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 | |
# [email protected] | |
from kafka import KafkaProducer | |
import sys, random, string, os | |
from time import sleep |
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
# 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 |
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
********************************* | |
### Step one: bring up the cluster | |
asciinema rec | |
docker run --name Node_X -d scylladb/scylla | |
docker exec -it Node_X nodetool status |
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
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 |
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
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 |
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
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 |
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
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 |
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
-- 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