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
| > CREATE TABLE base_table ( | |
| pk text, | |
| ck text, | |
| val1 text, | |
| val2 text, | |
| PRIMARY KEY (pk, ck) | |
| ) WITH cdc = { ‘enabled’ = ‘true’, preimage = ‘true’ }; |
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
| ssize_t read(int fd, void *buf, size_t count); | |
| ssize_t write(int fd, const void *buf, size_t count); |
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
| > SELECT * FROM system.large_rows; | |
| keyspace_name | table_name | sstable_name | row_size | partition_key | clustering_key | compaction_time | |
| --------------+------------+--------------------------------------------------------------------------------------+----------+---------------+----------------+--------------------------------- | |
| mykeyspace | gr | /var/lib/scylla/data/mykeyspace/gr-67d502908ea211e98d05000000000000/mc-1-big-Data.db | 1206130 | 1 | 1 | 2019-06-14 13:03:24.039000+0000 |
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
| source: | |
| hostURL: http://dynamodb.us-east-1.amazonaws.com | |
| region: us-east-1 | |
| port: 8000 | |
| credentials: | |
| accessKey: <user> | |
| secretKey: <pass> | |
| target: | |
| hostURL: http://scylla-ip | |
| port: 8000 |
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
| CREATE TABLE ks.tbl ( | |
| uuid int, | |
| time timestamp, | |
| property text, | |
| PRIMARY KEY (uuid, 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
| $ tar -xzf confluent-5.2.0-2.12.tar.gz | |
| $ cd confluent-5.2.0/ |
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
| val connector = | |
| new CassandraConnector(CassandraConnectorConf(sparkContext.getConf)) |
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
| cqlsh> desc SCHEMA | |
| CREATE KEYSPACE catalog WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true; | |
| CREATE TABLE catalog.apparel ( | |
| sku text, | |
| color text, | |
| size text, | |
| brand text, | |
| gender text, | |
| group text, |
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
| #!/usr/bin/python3 | |
| import yaml | |
| a = yaml.load("string: hello world!") | |
| print(a['string']) |
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
| # On one node, start the master: | |
| spark-2.4.0-bin-hadoop2.7 $ ./sbin/start-master.sh | |
| # On the same node, and on the other nodes, start the Spark workers: | |
| spark-2.4.0-bin-hadoop2.7 $ SPARK_WORKER_INSTANCES=8 SPARK_WORKER_CORES=2 ./sbin/start-slave.sh spark://<spark-master-ip>:7077 |