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
| id | name | |
| --------------------------------------+-------------- | |
| d157ecfd-84df-4da3-a552-6176cd9a80ee | Example item |
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: | |
| type: dynamodb | |
| endpoint: | |
| host: http://dynamodb | |
| port: 8000 | |
| region: us-west-1 | |
| credentials: | |
| accessKey: dummy | |
| secretKey: dummy | |
| table: Example |
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/env sh | |
| generate_25_items() { | |
| local items="" | |
| for i in `seq 1 25`; do | |
| items="${items}"'{ | |
| "PutRequest": { | |
| "Item": { | |
| "id": { "S": "'"$(uuidgen)"'" }, | |
| "col1": { "S": "'"$(uuidgen)"'" }, |
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/env sh | |
| # Create table | |
| aws \ | |
| --endpoint-url http://localhost:8000 \ | |
| dynamodb create-table \ | |
| --table-name Example \ | |
| --attribute-definitions AttributeName=id,AttributeType=S \ | |
| --key-schema AttributeName=id,KeyType=HASH \ | |
| --provisioned-throughput ReadCapacityUnits=100,WriteCapacityUnits=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
| #!/bin/bash | |
| export SPARK_NO_DAEMONIZE=true | |
| if [ "$1" == "master" ] | |
| then | |
| echo "Starting a Spark master node" | |
| start-master.sh | |
| elif [ "$1" == "worker" ] | |
| then |
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
| FROM alpine:3.20 | |
| ENV SPARK_VERSION=3.5.1 \ | |
| HADOOP_VERSION=3 \ | |
| SCALA_VERSION=2.13 \ | |
| SPARK_HOME="/spark" | |
| RUN set -ex; \ | |
| apk add --no-cache openjdk11-jre bash rsync procps openssh coreutils; \ | |
| wget https://archive.apache.org/dist/spark/spark-${SPARK_VERSION}/spark-${SPARK_VERSION}-bin-hadoop${HADOOP_VERSION}-scala${SCALA_VERSION}.tgz; \ |
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
| services: | |
| dynamodb: | |
| command: "-jar DynamoDBLocal.jar -sharedDb -inMemory" | |
| image: "amazon/dynamodb-local:2.5.2" | |
| ports: | |
| - "8000:8000" | |
| working_dir: /home/dynamodblocal | |
| spark-master: |
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
| { | |
| "migtest": [ | |
| { | |
| "PutRequest": { | |
| "Item": { | |
| "City": { "S": "New York" }, | |
| "Date": { "S": "2022-03-15" } | |
| } | |
| } | |
| }, |
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
| INSERT INTO data.tbl (id, data) VALUES (1, 'a'); | |
| INSERT INTO data.tbl (id, data) VALUES (2, 'b'); | |
| INSERT INTO data.tbl (id, data) VALUES (3, 'c'); | |
| INSERT INTO data.tbl (id, data) VALUES (4, 'd'); | |
| INSERT INTO data.tbl (id, data) VALUES (5, 'e'); |
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 KEYSPACE data WITH replication = {'class': 'NetworkTopologyStrategy', 'datacenter1': 1}; | |
| CREATE TABLE data.tbl ( id INT, data TEXT, PRIMARY KEY(id)); |
NewerOlder