yzeng1618 commented on code in PR #10253:
URL: https://github.com/apache/seatunnel/pull/10253#discussion_r2655331897
##########
seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/utils/HiveMetaStoreCatalog.java:
##########
@@ -255,13 +319,39 @@ private HiveMetaStoreClient loginWithKerberos(HiveConf
hiveConf) throws Exceptio
keytabPath,
(conf, ugi) -> {
this.userGroupInformation = ugi;
- return new HiveMetaStoreClient(hiveConf);
+ return createClient(hiveConf);
});
}
- private HiveMetaStoreClient loginWithRemoteUser(HiveConf hiveConf) throws
Exception {
+ private IMetaStoreClient loginWithRemoteUser(HiveConf hiveConf) throws
Exception {
return HadoopLoginFactory.loginWithRemoteUser(
- new Configuration(), remoteUser, (conf, ugi) -> new
HiveMetaStoreClient(hiveConf));
+ new Configuration(), remoteUser, (conf, ugi) ->
createClient(hiveConf));
+ }
+
+ private static String normalizeMetastoreUris(String metastoreUri) {
+ if (metastoreUri == null) {
+ return null;
+ }
Review Comment:
Thank you for your suggestions. We have made the revisions.
##########
seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/utils/HiveMetaStoreCatalog.java:
##########
@@ -255,13 +319,39 @@ private HiveMetaStoreClient loginWithKerberos(HiveConf
hiveConf) throws Exceptio
keytabPath,
(conf, ugi) -> {
this.userGroupInformation = ugi;
- return new HiveMetaStoreClient(hiveConf);
+ return createClient(hiveConf);
});
}
- private HiveMetaStoreClient loginWithRemoteUser(HiveConf hiveConf) throws
Exception {
+ private IMetaStoreClient loginWithRemoteUser(HiveConf hiveConf) throws
Exception {
return HadoopLoginFactory.loginWithRemoteUser(
- new Configuration(), remoteUser, (conf, ugi) -> new
HiveMetaStoreClient(hiveConf));
+ new Configuration(), remoteUser, (conf, ugi) ->
createClient(hiveConf));
+ }
+
+ private static String normalizeMetastoreUris(String metastoreUri) {
+ if (metastoreUri == null) {
+ return null;
+ }
+ String[] uris = metastoreUri.split(",");
+ List<String> cleaned = new ArrayList<>(uris.length);
+ for (String uri : uris) {
+ String trimmed = uri.trim();
+ if (!trimmed.isEmpty()) {
+ cleaned.add(trimmed);
+ }
+ }
+ return String.join(",", cleaned);
+ }
+
+ private static String getFirstMetastoreUri(String metastoreUri) {
+ if (metastoreUri == null) {
+ return null;
Review Comment:
Thank you for your suggestions. We have made the revisions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]