-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
destination-mysql: convert prod code to kotlin (#40553)
## What <!-- * Describe what the change is solving. Link all GitHub issues related to this change. --> ## How <!-- * Describe how code changes achieve the solution. --> ## Review guide <!-- 1. `x.py` 2. `y.py` --> ## User Impact <!-- * What is the end result perceived by the user? * If there are negative side effects, please list them. --> ## Can this PR be safely reverted and rolled back? <!-- * If unsure, leave it blank. --> - [ ] YES 💚 - [ ] NO ❌
- Loading branch information
1 parent
4b3d780
commit 4b17639
Showing
12 changed files
with
631 additions
and
588 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
43 changes: 0 additions & 43 deletions
43
...rc/main/java/io/airbyte/integrations/destination/mysql/MySQLDestinationStrictEncrypt.java
This file was deleted.
Oops, something went wrong.
41 changes: 41 additions & 0 deletions
41
...rc/main/kotlin/io/airbyte/integrations/destination/mysql/MySQLDestinationStrictEncrypt.kt
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,41 @@ | ||
/* | ||
* Copyright (c) 2023 Airbyte, Inc., all rights reserved. | ||
*/ | ||
package io.airbyte.integrations.destination.mysql | ||
|
||
import com.fasterxml.jackson.databind.node.ObjectNode | ||
import io.airbyte.cdk.db.jdbc.JdbcUtils | ||
import io.airbyte.cdk.integrations.base.Destination | ||
import io.airbyte.cdk.integrations.base.IntegrationRunner | ||
import io.airbyte.cdk.integrations.base.spec_modification.SpecModifyingDestination | ||
import io.airbyte.commons.json.Jsons | ||
import io.airbyte.protocol.models.v0.ConnectorSpecification | ||
import org.slf4j.Logger | ||
import org.slf4j.LoggerFactory | ||
|
||
class MySQLDestinationStrictEncrypt : | ||
SpecModifyingDestination(MySQLDestination.sshWrappedDestination()), Destination { | ||
override fun modifySpec(originalSpec: ConnectorSpecification): ConnectorSpecification { | ||
val spec: ConnectorSpecification = Jsons.clone(originalSpec) | ||
(spec.connectionSpecification["properties"] as ObjectNode).remove(JdbcUtils.SSL_KEY) | ||
return spec | ||
} | ||
|
||
companion object { | ||
private val LOGGER: Logger = | ||
LoggerFactory.getLogger(MySQLDestinationStrictEncrypt::class.java) | ||
|
||
@Throws(Exception::class) | ||
@JvmStatic | ||
fun main(args: Array<String>) { | ||
val destination: Destination = MySQLDestinationStrictEncrypt() | ||
LOGGER.info("starting destination: {}", MySQLDestinationStrictEncrypt::class.java) | ||
try { | ||
IntegrationRunner(destination).run(args) | ||
} catch (e: Exception) { | ||
MySQLDestination.handleException(e) | ||
} | ||
LOGGER.info("completed destination: {}", MySQLDestinationStrictEncrypt::class.java) | ||
} | ||
} | ||
} |
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
211 changes: 0 additions & 211 deletions
211
...ation-mysql/src/main/java/io/airbyte/integrations/destination/mysql/MySQLDestination.java
This file was deleted.
Oops, something went wrong.
64 changes: 0 additions & 64 deletions
64
...n-mysql/src/main/java/io/airbyte/integrations/destination/mysql/MySQLNameTransformer.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.