jongyoul commented on code in PR #4706:
URL: https://github.com/apache/zeppelin/pull/4706#discussion_r1499418005


##########
mongodb/src/main/java/org/apache/zeppelin/mongodb/MongoDbInterpreter.java:
##########
@@ -73,7 +73,15 @@ public void open() {
     }
     commandTimeout = 
Long.parseLong(getProperty("mongo.shell.command.timeout"));
     maxConcurrency = 
Integer.parseInt(getProperty("mongo.interpreter.concurrency.max"));
-    dbAddress = getProperty("mongo.server.host") + ":" + 
getProperty("mongo.server.port");
+
+               /* adding support for protocal like mongodb+srv for atlas 
cluster*/
+    String mongoProtocol = getProperty("mongo.server.protocol", "mongodb");
+               if ("mongodb".equalsIgnoreCase(mongoProtocol)){
+      dbAddress = getProperty("mongo.server.host") + ":" + 
getProperty("mongo.server.port");
+               }else{
+           dbAddress = mongoProtocol +"://"+ getProperty("mongo.server.host");

Review Comment:
   Thank you for the response. BTW, for the conservative way, could you please 
add the code for port availability? I also don't know if it's really needed but 
I think it would be better to add it anyway. WDYT?



-- 
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]

Reply via email to