cgivre commented on a change in pull request #2352:
URL: https://github.com/apache/drill/pull/2352#discussion_r737391537
##########
File path:
contrib/storage-mongo/src/main/java/org/apache/drill/exec/store/mongo/MongoStoragePlugin.java
##########
@@ -195,6 +199,18 @@ public MongoClient getClient() {
return getClient(addresses);
}
+ public synchronized MongoClient getClientWithSrvProtocol() {
+ MongoClientSettings settings = MongoClientSettings.builder()
+ .applyConnectionString(clientURI)
+ .build();
+ MongoClient client = MongoClients.create(settings);
+ ServerAddress serverAddress = new
ServerAddress(clientURI.getHosts().get(0));
+ String userName = clientURI.getCredential().getUserName();
Review comment:
@luocooong
Thanks for the rapid response on this. I have a minor suggestion. We
should include support for credentials coming from a credential provider, not
just hard coded creds in the URL. I think you can reuse some code below.
Thanks again!
--
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]