-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
transformer-kafka: add semi-automatic test scenarios using cloud reso…
…urces (close #1302)
- Loading branch information
Showing
18 changed files
with
1,238 additions
and
58 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
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
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
33 changes: 33 additions & 0 deletions
33
...analytics/snowplow/rdbloader/transformer/stream/kafka/experimental/AppConfiguration.scala
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,33 @@ | ||
/* | ||
* Copyright (c) 2012-present Snowplow Analytics Ltd. All rights reserved. | ||
* | ||
* This program is licensed to you under the Snowplow Community License Version 1.0, | ||
* and you may not use this file except in compliance with the Snowplow Community License Version 1.0. | ||
* You may obtain a copy of the Snowplow Community License Version 1.0 at https://docs.snowplow.io/community-license-1.0 | ||
*/ | ||
package com.snowplowanalytics.snowplow.rdbloader.transformer.stream.kafka.experimental | ||
|
||
import com.snowplowanalytics.snowplow.rdbloader.common.LoaderMessage.TypesInfo.WideRow | ||
import com.snowplowanalytics.snowplow.rdbloader.common.config.TransformerConfig.Compression | ||
|
||
final case class AppConfiguration( | ||
compression: Compression, | ||
fileFormat: WideRow.WideRowFormat, | ||
windowFrequencyMinutes: Long | ||
) | ||
|
||
object AppConfiguration { | ||
|
||
/** | ||
* Regarding `windowFrequencyMinutes = 1` - officially the default 'windowing' setting for | ||
* streaming transformer is '10 minutes'. As we don't want to make the tests take too much time, | ||
* we use 1 minute here. It means that for all test scenarios using this default confguration, | ||
* transformer instance under the test needs to be configured with `1 minute` windowing setting. | ||
* | ||
* Compression and file format defaults match the ones from the official reference file. | ||
* | ||
* See reference here -> | ||
* https://github.com/snowplow/snowplow-rdb-loader/blob/master/modules/common-transformer-stream/src/main/resources/application.conf | ||
*/ | ||
val default = AppConfiguration(Compression.Gzip, WideRow.WideRowFormat.JSON, windowFrequencyMinutes = 1) | ||
} |
25 changes: 25 additions & 0 deletions
25
...wanalytics/snowplow/rdbloader/transformer/stream/kafka/experimental/AppDependencies.scala
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,25 @@ | ||
/* | ||
* Copyright (c) 2012-present Snowplow Analytics Ltd. All rights reserved. | ||
* | ||
* This program is licensed to you under the Snowplow Community License Version 1.0, | ||
* and you may not use this file except in compliance with the Snowplow Community License Version 1.0. | ||
* You may obtain a copy of the Snowplow Community License Version 1.0 at https://docs.snowplow.io/community-license-1.0 | ||
*/ | ||
package com.snowplowanalytics.snowplow.rdbloader.transformer.stream.kafka.experimental | ||
|
||
import cats.effect.IO | ||
import cats.effect.kernel.Resource | ||
import com.snowplowanalytics.snowplow.rdbloader.common.cloud.{BlobStorage, Queue} | ||
|
||
final case class AppDependencies( | ||
blobClient: BlobStorage[IO], | ||
queueConsumer: Queue.Consumer[IO], | ||
producer: Queue.Producer[IO] | ||
) | ||
|
||
object AppDependencies { | ||
|
||
trait Provider { | ||
def createDependencies(): Resource[IO, AppDependencies] | ||
} | ||
} |
Oops, something went wrong.