|
1 | | -package za.co.absa.spline.harvester.dispatcher.sqsdispatcher |
| 1 | +/* |
| 2 | + * Copyright 2019 ABSA Group Limited |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | + |
| 17 | +package za.co.absa.spline.harvester.dispatcher |
2 | 18 |
|
3 | 19 | import org.apache.commons.configuration.Configuration |
4 | 20 | import org.apache.spark.internal.Logging |
5 | 21 | import software.amazon.awssdk.services.sqs.SqsClient |
6 | 22 | import software.amazon.awssdk.services.sqs.model.SendMessageRequest |
7 | 23 | import za.co.absa.commons.version.Version |
8 | | -import za.co.absa.spline.harvester.dispatcher.LineageDispatcher |
9 | 24 | import za.co.absa.spline.harvester.dispatcher.modelmapper.ModelMapper |
| 25 | +import za.co.absa.spline.harvester.dispatcher.sqsdispatcher.SqsLineageDispatcherConfig |
10 | 26 | import za.co.absa.spline.producer.model.{ExecutionEvent, ExecutionPlan} |
11 | 27 |
|
12 | | -class SqsLineageDispatcherImpl(sqsClient: SqsClient, |
13 | | - sqsUrl: String, |
14 | | - apiVersion: Version) extends LineageDispatcher with Logging { |
| 28 | +class SqsLineageDispatcher(sqsClient: SqsClient, |
| 29 | + sqsUrl: String, |
| 30 | + apiVersion: Version) extends LineageDispatcher with Logging { |
15 | 31 | import za.co.absa.spline.harvester.json.HarvesterJsonSerDe.impl._ |
16 | 32 | def this(dispatcherConfig: SqsLineageDispatcherConfig) = this( |
17 | | - SqsLineageDispatcherImpl.createSqsClient(dispatcherConfig), |
| 33 | + SqsLineageDispatcher.createSqsClient(dispatcherConfig), |
18 | 34 | dispatcherConfig.queueUrl, |
19 | 35 | dispatcherConfig.apiVersion |
20 | 36 | ) |
@@ -72,7 +88,7 @@ class SqsLineageDispatcherImpl(sqsClient: SqsClient, |
72 | 88 | } |
73 | 89 |
|
74 | 90 |
|
75 | | -object SqsLineageDispatcherImpl extends Logging { |
| 91 | +object SqsLineageDispatcher extends Logging { |
76 | 92 |
|
77 | 93 | private def createSqsClient(config: SqsLineageDispatcherConfig): SqsClient = { |
78 | 94 | SqsClient |
|
0 commit comments