[KYUUBI #7051] Fix usage without sslTrustStore of JDBC driver

### Why are the changes needed?

If `sslTrustStore` is not provided `org.apache.hadoop.conf.Configuration` class existence becomes a hard dependency.
This makes jdbc client too complex to configure: extra Hadoop jars should be provided.

`hadoopCredentialProviderAvailable` variable is useless in the previous implementation logic because it's always `true` or the code is not reachable.

<img width="898" alt="Screenshot 2025-05-09 at 13 05 12" src="https://github.com/user-attachments/assets/6d202555-38c6-40d2-accb-eb78a3d4184e" />

### How was this patch tested?

Build jar and used it to connect from DataGrip.
<img width="595" alt="Screenshot 2025-05-09 at 13 01 29" src="https://github.com/user-attachments/assets/c6e4d904-a3dd-4d3f-9bdd-8bb47ed1e834" />

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #7058 from Khrol/master.

Closes #7051

b594757a0 [Igor Khrol] JDBC driver: allow usage without sslTrustStore

Authored-by: Igor Khrol <khroliz@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
(cherry picked from commit 61487acfa0)
Signed-off-by: Cheng Pan <chengpan@apache.org>
This commit is contained in:
Igor Khrol 2025-05-12 12:57:27 +08:00 committed by Cheng Pan
parent 48f31ad1ab
commit 8cb81873b4
No known key found for this signature in database
GPG Key ID: 8001952629BCC75D

View File

@ -669,7 +669,6 @@ public class Utils {
hadoopCredentialProviderAvailable = true;
} catch (Exception exception) {
LOG.warn("Hadoop credential provider is unavailable", exception);
throw new RuntimeException(exception);
}
}
if (password == null && hadoopCredentialProviderAvailable) {