Skip to content

Commit b39ee39

Browse files
committed
add github package registry & follow latest connector refactoring
1 parent 52f2c22 commit b39ee39

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

hive/build.gradle.kts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ version = "0.0.1-SNAPSHOT"
66

77
repositories {
88
mavenLocal()
9+
maven {
10+
url = uri("https://maven.pkg.github.com/tellery/tellery")
11+
credentials {
12+
username = project.findProperty("gpr.user") as String? ?: System.getenv("GITHUB_USERNAME")
13+
password = project.findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN")
14+
}
15+
}
916
jcenter()
1017
}
1118

@@ -16,7 +23,7 @@ plugins {
1623
}
1724

1825
dependencies {
19-
implementation("io.tellery:connector-interface:0.0.1-SNAPSHOT")
26+
implementation("io.tellery:connector-interface:0.4.0-SNAPSHOT")
2027
implementation("org.apache.hive:hive-jdbc:2.1.0") {
2128
exclude(group = "org.slf4j", module = "")
2229
exclude(group = "log4j", module = "log4j")

hive/src/HiveConnector.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,9 @@ import java.sql.Types
1616

1717
@Connector(
1818
type="Hive/SparkSQL",
19-
jdbcConfigs = [
19+
configs = [
2020
Config(name="Endpoint", type= ConfigType.STRING, description="The endpoint of your hive / sparkSQL thrift server", hint="localhost",required=true),
2121
Config(name="Port", type= ConfigType.NUMBER, description="the port number", hint="10001",required=true),
22-
],
23-
optionals = [
2422
Config(name="S3AccessKey", type=ConfigType.STRING, description="S3 Access Key ID(for uploading csv)"),
2523
Config(name="S3SecretKey", type=ConfigType.STRING, description="S3 Secret Access Key (for uploading csv)", secret=true),
2624
Config(name="S3Region", type=ConfigType.STRING, description="S3 region (be the same as your Redshift cluster", hint="us-east-1"),
@@ -42,7 +40,7 @@ class HiveConnector : JDBCConnector() {
4240

4341
override fun initByProfile(profile: Profile) {
4442
super.initByProfile(profile)
45-
s3Client = S3Storage.buildByOptionals(profile.optionals)
43+
s3Client = S3Storage.buildFromConfigs(profile.configs)
4644
s3Client?.run {
4745
logger.info("{} has initialized s3 client", profile.name)
4846
}

0 commit comments

Comments
 (0)