Jan Soubusta
02/16/2024, 3:44 PMKartik Khare
02/16/2024, 3:55 PMTim Veil
02/16/2024, 4:11 PMTim Veil
02/16/2024, 4:12 PMTim Veil
02/16/2024, 4:14 PMTim Veil
02/16/2024, 4:14 PMTim Veil
02/16/2024, 4:21 PMJan Soubusta
02/16/2024, 4:23 PMKartik Khare
02/16/2024, 4:24 PMJan Soubusta
02/19/2024, 9:52 AMJan Soubusta
02/19/2024, 9:56 AMshared suffix in gradle file?Vik Gamov
02/23/2024, 7:07 PMapply plugin: 'java'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.apache.pinot:pinot-jdbc-client:1.0.0:shaded'
}
check it out ^ Will it work for you?Jan Soubusta
02/26/2024, 11:20 AMExecution failed for task ':microservices:sql-executor:kaptGenerateStubsKotlin'.
> Error while evaluating property 'filteredArgumentsMap' of task ':microservices:sql-executor:kaptGenerateStubsKotlin'.
> Could not resolve all files for configuration ':microservices:sql-executor:compileClasspath'.
> Could not find pinot-jdbc-client-1.0.0-shared.jar (org.apache.pinot:pinot-jdbc-client:1.0.0).
Searched in the following locations:
<https://repo.maven.apache.org/maven2/org/apache/pinot/pinot-jdbc-client/1.0.0/pinot-jdbc-client-1.0.0-shared.jar>
The driver can be downloaded from https://repo1.maven.org/maven2/org/apache/pinot/pinot-jdbc-client/1.0.0/pinot-jdbc-client-1.0.0-shaded.jar.
I don't know why my Gradle resolves the base URL differently.Kartik Khare
02/26/2024, 12:07 PMVik Gamov
02/27/2024, 3:15 PMshaded NOT sharedJan Soubusta
02/28/2024, 7:21 AMJan Soubusta
02/28/2024, 7:26 AMVik Gamov
02/28/2024, 3:25 PMJan Soubusta
02/28/2024, 4:34 PM/*
* (C) 2020 GoodData Corporation
*/
package com.gooddata.tiger.sqlexecutor.db
import java.net.URL
import java.net.URLClassLoader
import java.util.Enumeration
/**
* DbClassLoader is basically URLClassLoader with reversed order of loading classes. Standard class loading mechanism
* is to try parent class loader and only if parent cannot load the class current class loader is supposed to load it
* by itself.
*
* DbClassLoader needs to approach class loading in different way. To avoid class definition clashes between loaded
* drivers and Tiger components we need to isolate driver class graph as much as possible. With this in mind
* DbClassLoader tries to load classes by itself and only when this fails it falls back to parent class loader.
*/
class DbClassLoader(urls: Array<URL?>) : URLClassLoader(urls, DbClassLoader::class.java.classLoader) {
/**
* Tries to load specified class. Implementation uses reversed order for class loading - i.e. instead of trying
* parent class loader first (to avoid class duplications) it tries to load classes itself and only when the class
* is not found it falls back to parent class loader.
*/
override fun loadClass(name: String?, resolve: Boolean): Class<*>? {
synchronized(getClassLoadingLock(name)) {
val clazz = findLoadedClass(name)
?: findDriverClass(name)
?: parent.loadClass(name)
if (resolve) {
resolveClass(clazz)
}
return clazz
}
}
/**
* Tries to load the resources. Implementation uses reversed order for the lookup and does not search whole
* class loader hierarchy - i.e. instead of trying parent class loader first it tries to load resources themselves
* and only when no resource is found it falls back to the parent class loader.
*/
override fun getResources(name: String): Enumeration<URL> {
val dbResources = findResources(name)
return if (dbResources.hasMoreElements()) dbResources else parent.getResources(name)
}
/**
* Tries to load the resource. Implementation uses reversed order for the lookup and does not search whole
* class loader hierarchy - i.e. instead of trying parent class loader first it tries to load resource itself and
* only when the resource is not found it falls back to the parent class loader.
*/
override fun getResource(name: String): URL? = findResource(name) ?: parent.getResource(name)
/**
* Tries to find driver class from managed URL locations. There are some hardcoded exceptions for which we need
* to fail - e.g. slf4j library.
*/
private fun findDriverClass(name: String?): Class<*>? =
if (name?.startsWith("org.slf4j") == true) {
null
} else {
try {
findClass(name)
} catch (e: ClassNotFoundException) {
null
}
}
}Marco
01/22/2025, 5:31 PMMarco
01/22/2025, 5:34 PMJan Soubusta
01/23/2025, 7:36 AMjdbc:pinot://<host_name>:443?useMultistageEngine=true
I used Username&password auth.
Last time I tried it circa 1 year ago.Jan Soubusta
01/23/2025, 7:37 AMMarco
01/23/2025, 9:40 AMJan Soubusta
01/24/2025, 9:42 AMjdbc:pinot://<host>:443?scheme=https&brokers=<broker_host>