Skip to content

Commit

Permalink
Merge pull request #116 from eljeko/main
Browse files Browse the repository at this point in the history
Update csv function, web UI, template editor and minor fixes
  • Loading branch information
ugol authored Dec 12, 2023
2 parents f45cc85 + b84f720 commit 85b6d2a
Show file tree
Hide file tree
Showing 62 changed files with 3,125 additions and 96 deletions.
14 changes: 14 additions & 0 deletions README-use-emitter-templates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Emitter usage guide

This is a list of `jr` commands to run the templates that are linked togheter using emitters.

The preconfigured emitters examples have Kafka as output.

# Global templates

These templates:

* util_userid.tpl
* util_ip.tpl

Are used to preload lists of values used in the other templates in the emitter configuration.
58 changes: 58 additions & 0 deletions emittter_configs/jrconfig_emitter_clickstream.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"emitters": [
{
"name": "clickstream_users_schema",
"locale": "us",
"num": 0,
"frequency": "0s",
"duration": "0s",
"preload": 30,
"valueTemplate": "clickstream_users_schema",
"output": "kafka",
"keyTemplate": "null",
"outputTemplate": "{{.V}}\n",
"topic": "clickstream_users_schema"
} ,
{
"name": "clickstream_schema",
"locale": "us",
"num": 1,
"frequency": "500ms",
"duration": "3s",
"preload": 0,
"valueTemplate": "clickstream_schema",
"output": "kafka",
"keyTemplate": "null",
"outputTemplate": "{{.V}}\n",
"topic": "clickstream_schema"
},
{
"name": "clickstream_codes_schema",
"locale": "us",
"num": 1,
"frequency": "500ms",
"duration": "3s",
"preload": 0,
"valueTemplate": "clickstream_codes_schema",
"output": "kafka",
"keyTemplate": "null",
"outputTemplate": "{{.V}}\n",
"topic": "clickstream_codes_schema"
}
],
"global": {
"seed": -1,
"kafkaConfig": "./kafka/config.properties",
"schemaRegistry": true,
"registryConfig": "./kafka/registry.properties",
"serializer": "avro-generic",
"autoCreate": true,
"redisTtl": "1m",
"redisConfig": "./redis/config.json",
"mongoConfig": "./mongoDB/config.json",
"elasticConfig": "./elastic/config.json",
"s3Config": "./s3/config.json",
"gcsConfig": "./gcs/config.json",
"url": ""
}
}
58 changes: 58 additions & 0 deletions emittter_configs/jrconfig_emitter_creditcard_transactions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"emitters": [
{
"name": "util_userid",
"locale": "us",
"num": 0,
"frequency": "0s",
"duration": "0s",
"preload": 50,
"valueTemplate": "util_userid",
"output": "stdout",
"keyTemplate": "null",
"outputTemplate": "{{.V}}\n",
"topic": "util_userid"
},
{
"name": "credit_cards",
"locale": "us",
"num": 0,
"frequency": "0s",
"duration": "0s",
"preload": 30,
"valueTemplate": "credit_cards",
"output": "kafka",
"keyTemplate": "null",
"outputTemplate": "{{.V}}\n",
"topic": "credit_cards"
},
{
"name": "transactions",
"locale": "us",
"num": 1,
"frequency": "100ms",
"duration": "3s",
"preload": 0,
"valueTemplate": "transactions",
"output": "kafka",
"keyTemplate": "null",
"outputTemplate": "{{.V}}\n",
"topic": "transactions"
}
],
"global": {
"seed": -1,
"kafkaConfig": "./kafka/config.properties",
"schemaRegistry": true,
"registryConfig": "./kafka/registry.properties",
"serializer": "avro-generic",
"autoCreate": true,
"redisTtl": "1m",
"redisConfig": "./redis/config.json",
"mongoConfig": "./mongoDB/config.json",
"elasticConfig": "./elastic/config.json",
"s3Config": "./s3/config.json",
"gcsConfig": "./gcs/config.json",
"url": ""
}
}
58 changes: 58 additions & 0 deletions emittter_configs/jrconfig_emitter_fleet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"emitters": [
{
"name": "fleet_mgmt_sensor",
"locale": "us",
"num": 1,
"frequency": "1s",
"duration": "1s",
"preload": 10,
"valueTemplate": "fleet_mgmt_sensor",
"output": "kafka",
"keyTemplate": "null",
"outputTemplate": "{{.V}}\n",
"topic": "fleet_mgmt_sensor"
},
{
"name": "fleet_mgmt_location",
"locale": "us",
"num": 1,
"frequency": "100ms",
"duration": "1s",
"preload": 0,
"valueTemplate": "fleet_mgmt_location",
"output": "kafka",
"keyTemplate": "null",
"outputTemplate": "{{.V}}\n",
"topic": "fleet_mgmt_location"
},
{
"name": "fleet_mgmt_description",
"locale": "us",
"num": 1,
"frequency": "100ms",
"duration": "1s",
"preload": 0,
"valueTemplate": "fleet_mgmt_description",
"output": "kafka",
"keyTemplate": "null",
"outputTemplate": "{{.V}}\n",
"topic": "fleet_mgmt_description"
}
],
"global": {
"seed": -1,
"kafkaConfig": "./kafka/config.properties",
"schemaRegistry": true,
"registryConfig": "./kafka/registry.properties",
"serializer": "avro-generic",
"autoCreate": true,
"redisTtl": "1m",
"redisConfig": "./redis/config.json",
"mongoConfig": "./mongoDB/config.json",
"elasticConfig": "./elastic/config.json",
"s3Config": "./s3/config.json",
"gcsConfig": "./gcs/config.json",
"url": ""
}
}
58 changes: 58 additions & 0 deletions emittter_configs/jrconfig_emitter_gaming.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"emitters": [
{
"name": "gaming_games",
"locale": "us",
"num": 1,
"frequency": "500ms",
"duration": "2s",
"preload": 0,
"valueTemplate": "gaming_games",
"output": "kafka",
"keyTemplate": "null",
"outputTemplate": "{{.V}}\n",
"topic": "gaming_games"
},
{
"name": "gaming_players",
"locale": "us",
"num": 0,
"frequency": "0s",
"duration": "0s",
"preload": 200,
"valueTemplate": "gaming_players",
"output": "kafka",
"keyTemplate": "null",
"outputTemplate": "{{.V}}\n",
"topic": "gaming_players"
},
{
"name": "gaming_player_activity",
"locale": "us",
"num": 1,
"frequency": "100ms",
"duration": "3s",
"preload": 0,
"valueTemplate": "gaming_player_activity",
"output": "kafka",
"keyTemplate": "null",
"outputTemplate": "{{.V}}\n",
"topic": "gaming_player_activity"
}
],
"global": {
"seed": -1,
"kafkaConfig": "./kafka/config.properties",
"schemaRegistry": true,
"registryConfig": "./kafka/registry.properties",
"serializer": "avro-generic",
"autoCreate": true,
"redisTtl": "1m",
"redisConfig": "./redis/config.json",
"mongoConfig": "./mongoDB/config.json",
"elasticConfig": "./elastic/config.json",
"s3Config": "./s3/config.json",
"gcsConfig": "./gcs/config.json",
"url": ""
}
}
58 changes: 58 additions & 0 deletions emittter_configs/jrconfig_emitter_insurrance.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"emitters": [
{
"name": "insurance_offers",
"locale": "us",
"num": 1,
"frequency": "500ms",
"duration": "2s",
"preload": 0,
"valueTemplate": "insurance_offers",
"output": "kafka",
"keyTemplate": "null",
"outputTemplate": "{{.V}}\n",
"topic": "insurance_offers"
},
{
"name": "insurance_customers",
"locale": "us",
"num": 0,
"frequency": "0s",
"duration": "0s",
"preload": 200,
"valueTemplate": "insurance_customers",
"output": "kafka",
"keyTemplate": "null",
"outputTemplate": "{{.V}}\n",
"topic": "insurance_customers"
},
{
"name": "insurance_customer_activity",
"locale": "us",
"num": 1,
"frequency": "100ms",
"duration": "3s",
"preload": 0,
"valueTemplate": "insurance_customer_activity",
"output": "kafka",
"keyTemplate": "null",
"outputTemplate": "{{.V}}\n",
"topic": "insurance_customer_activity"
}
],
"global": {
"seed": -1,
"kafkaConfig": "./kafka/config.properties",
"schemaRegistry": true,
"registryConfig": "./kafka/registry.properties",
"serializer": "avro-generic",
"autoCreate": true,
"redisTtl": "1m",
"redisConfig": "./redis/config.json",
"mongoConfig": "./mongoDB/config.json",
"elasticConfig": "./elastic/config.json",
"s3Config": "./s3/config.json",
"gcsConfig": "./gcs/config.json",
"url": ""
}
}
45 changes: 45 additions & 0 deletions emittter_configs/jrconfig_emitter_inventory.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"emitters": [
{
"name": "product",
"locale": "us",
"num": 0,
"frequency": "0s",
"duration": "0s",
"preload": 50,
"valueTemplate": "product",
"output": "kafka",
"keyTemplate": "null",
"outputTemplate": "{{.V}}\n",
"topic": "product"
},
{
"name": "inventory",
"locale": "us",
"num": 1,
"frequency": "100ms",
"duration": "3s",
"preload": 0,
"valueTemplate": "inventory",
"output": "kafka",
"keyTemplate": "null",
"outputTemplate": "{{.V}}\n",
"topic": "inventory"
}
],
"global": {
"seed": -1,
"kafkaConfig": "./kafka/config.properties",
"schemaRegistry": true,
"registryConfig": "./kafka/registry.properties",
"serializer": "avro-generic",
"autoCreate": true,
"redisTtl": "1m",
"redisConfig": "./redis/config.json",
"mongoConfig": "./mongoDB/config.json",
"elasticConfig": "./elastic/config.json",
"s3Config": "./s3/config.json",
"gcsConfig": "./gcs/config.json",
"url": ""
}
}
Loading

0 comments on commit 85b6d2a

Please sign in to comment.