Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add inital Kafka smoke product tests
- Loading branch information
Showing
12 changed files
with
384 additions
and
2 deletions.
There are no files selected for viewing
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
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
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
10 changes: 10 additions & 0 deletions
10
presto-product-tests/conf/docker/singlenode-kafka/compose.sh
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
source "${BASH_SOURCE%/*}/../common/compose-commons.sh" | ||
|
||
docker-compose \ | ||
-f ${BASH_SOURCE%/*}/../common/standard.yml \ | ||
-f ${BASH_SOURCE%/*}/docker-compose.yml \ | ||
"$@" |
14 changes: 14 additions & 0 deletions
14
presto-product-tests/conf/docker/singlenode-kafka/docker-compose.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: '2' | ||
services: | ||
|
||
kafka: | ||
hostname: kafka | ||
image: spotify/kafka | ||
ports: | ||
- 9092:9092 | ||
- 2181:2181 | ||
command: | | ||
bash -xeuo pipefail -c " | ||
sed -i 's/#delete.topic.enable=true/delete.topic.enable=true/' /opt/kafka_2.11-0.10.1.0/config/server.properties | ||
exec supervisord -n | ||
" |
5 changes: 5 additions & 0 deletions
5
presto-product-tests/conf/presto/etc/catalog/kafka.properties
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
connector.name=kafka | ||
kafka.table-names=product_tests.simple_key_and_value,\ | ||
product_tests.all_datatypes_raw | ||
kafka.nodes=kafka:9092 | ||
kafka.table-description-dir=/docker/volumes/conf/presto/etc/catalog/kafka |
129 changes: 129 additions & 0 deletions
129
presto-product-tests/conf/presto/etc/catalog/kafka/all_datatypes_raw.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
{ | ||
"tableName": "all_datatypes_raw", | ||
"schemaName": "product_tests", | ||
"topicName": "all_datatypes_raw", | ||
"message": { | ||
"dataFormat": "raw", | ||
"fields": [ | ||
{ | ||
"name": "c_varchar", | ||
"type": "VARCHAR", | ||
"mapping": "0:5" | ||
}, | ||
|
||
|
||
|
||
{ | ||
"name": "c_byte_bigint", | ||
"dataFormat": "BYTE", | ||
"type": "BIGINT", | ||
"mapping": "5" | ||
}, | ||
{ | ||
"name": "c_short_bigint", | ||
"dataFormat": "SHORT", | ||
"type": "BIGINT", | ||
"mapping": "6" | ||
}, | ||
{ | ||
"name": "c_int_bigint", | ||
"dataFormat": "INT", | ||
"type": "BIGINT", | ||
"mapping": "8" | ||
}, | ||
{ | ||
"name": "c_long_bigint", | ||
"dataFormat": "LONG", | ||
"type": "BIGINT", | ||
"mapping": "12" | ||
}, | ||
|
||
|
||
|
||
{ | ||
"name": "c_byte_integer", | ||
"dataFormat": "BYTE", | ||
"type": "INTEGER", | ||
"mapping": "20" | ||
}, | ||
{ | ||
"name": "c_short_integer", | ||
"dataFormat": "SHORT", | ||
"type": "INTEGER", | ||
"mapping": "21" | ||
}, | ||
{ | ||
"name": "c_int_integer", | ||
"dataFormat": "INT", | ||
"type": "INTEGER", | ||
"mapping": "23" | ||
}, | ||
|
||
|
||
|
||
{ | ||
"name": "c_byte_smallint", | ||
"dataFormat": "BYTE", | ||
"type": "SMALLINT", | ||
"mapping": "27" | ||
}, | ||
{ | ||
"name": "c_short_smallint", | ||
"dataFormat": "SHORT", | ||
"type": "SMALLINT", | ||
"mapping": "28" | ||
}, | ||
|
||
|
||
|
||
{ | ||
"name": "c_byte_tinyint", | ||
"dataFormat": "BYTE", | ||
"type": "TINYINT", | ||
"mapping": "30" | ||
}, | ||
|
||
|
||
|
||
{ | ||
"name": "c_float_double", | ||
"dataFormat": "FLOAT", | ||
"type": "DOUBLE", | ||
"mapping": "31" | ||
}, | ||
{ | ||
"name": "c_double_double", | ||
"dataFormat": "double", | ||
"type": "DOUBLE", | ||
"mapping": "35" | ||
}, | ||
|
||
|
||
|
||
{ | ||
"name": "c_byte_boolean", | ||
"dataFormat": "BYTE", | ||
"type": "BOOLEAN", | ||
"mapping": "43" | ||
}, | ||
{ | ||
"name": "c_short_boolean", | ||
"dataFormat": "SHORT", | ||
"type": "BOOLEAN", | ||
"mapping": "44" | ||
}, | ||
{ | ||
"name": "c_int_boolean", | ||
"dataFormat": "INT", | ||
"type": "BOOLEAN", | ||
"mapping": "46" | ||
}, | ||
{ | ||
"name": "c_long_boolean", | ||
"dataFormat": "LONG", | ||
"type": "BOOLEAN", | ||
"mapping": "50" | ||
} | ||
] | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
presto-product-tests/conf/presto/etc/catalog/kafka/simple_key_and_value.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"tableName": "simple_key_and_value", | ||
"schemaName": "product_tests", | ||
"topicName": "simple_key_and_value", | ||
"message": { | ||
"dataFormat": "csv", | ||
"fields": [ | ||
{ | ||
"name": "varchar_value", | ||
"type": "VARCHAR", | ||
"mapping": "0" | ||
}, | ||
{ | ||
"name": "bigint_value", | ||
"type": "BIGINT", | ||
"mapping": "1" | ||
} | ||
] | ||
}, | ||
"key": { | ||
"dataFormat": "csv", | ||
"fields": [ | ||
{ | ||
"name": "varchar_key", | ||
"type": "VARCHAR", | ||
"mapping": "0" | ||
}, | ||
{ | ||
"name": "bigint_key", | ||
"type": "BIGINT", | ||
"mapping": "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
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
Oops, something went wrong.