Skip to content

Commit

Permalink
added license info
Browse files Browse the repository at this point in the history
  • Loading branch information
Neelab Chaudhuri authored and wajda committed Jul 9, 2024
1 parent 02e0c88 commit d5e37d4
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 7 deletions.
9 changes: 9 additions & 0 deletions core/src/main/resources/spline.default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,15 @@ spline:
# topic name
topic:

# -------------------------------------------
# Sqs dispatcher
# -------------------------------------------
sqs:
className: za.co.absa.spline.harvester.dispatcher.SqsLineageDispatcher
apiVersion: "1.2"
# fully qualified sqs queue url
queue.url:

# -------------------------------------------
# Console dispatcher
# -------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,36 @@
package za.co.absa.spline.harvester.dispatcher.sqsdispatcher
/*
* Copyright 2019 ABSA Group Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package za.co.absa.spline.harvester.dispatcher

import org.apache.commons.configuration.Configuration
import org.apache.spark.internal.Logging
import software.amazon.awssdk.services.sqs.SqsClient
import software.amazon.awssdk.services.sqs.model.SendMessageRequest
import za.co.absa.commons.version.Version
import za.co.absa.spline.harvester.dispatcher.LineageDispatcher
import za.co.absa.spline.harvester.dispatcher.modelmapper.ModelMapper
import za.co.absa.spline.harvester.dispatcher.sqsdispatcher.SqsLineageDispatcherConfig
import za.co.absa.spline.producer.model.{ExecutionEvent, ExecutionPlan}

class SqsLineageDispatcherImpl(sqsClient: SqsClient,
sqsUrl: String,
apiVersion: Version) extends LineageDispatcher with Logging {
class SqsLineageDispatcher(sqsClient: SqsClient,
sqsUrl: String,
apiVersion: Version) extends LineageDispatcher with Logging {
import za.co.absa.spline.harvester.json.HarvesterJsonSerDe.impl._
def this(dispatcherConfig: SqsLineageDispatcherConfig) = this(
SqsLineageDispatcherImpl.createSqsClient(dispatcherConfig),
SqsLineageDispatcher.createSqsClient(dispatcherConfig),
dispatcherConfig.queueUrl,
dispatcherConfig.apiVersion
)
Expand Down Expand Up @@ -72,7 +88,7 @@ class SqsLineageDispatcherImpl(sqsClient: SqsClient,
}


object SqsLineageDispatcherImpl extends Logging {
object SqsLineageDispatcher extends Logging {

private def createSqsClient(config: SqsLineageDispatcherConfig): SqsClient = {
SqsClient
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2019 ABSA Group Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package za.co.absa.spline.harvester.dispatcher.sqsdispatcher

import org.apache.commons.configuration.Configuration
Expand Down

0 comments on commit d5e37d4

Please sign in to comment.