You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2019/07/08 23:57:03 UTC

[GitHub] [incubator-pinot] jihaozh commented on a change in pull request #4404: Added support for Vertica as data source

jihaozh commented on a change in pull request #4404: Added support for Vertica as data source
URL: https://github.com/apache/incubator-pinot/pull/4404#discussion_r301347009
 
 

 ##########
 File path: thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/datasource/sql/SqlResponseCacheLoader.java
 ##########
 @@ -133,6 +137,35 @@ public SqlResponseCacheLoader(Map<String, Object> properties) throws Exception {
       }
     }
 
+    // Init Vertica datasources
+    if (properties.containsKey(VERTICA)) {
+      List<Map<String, Object>> verticaMapList = ConfigUtils.getList(properties.get(VERTICA));
+      for (Map<String, Object> objMap: verticaMapList) {
+        Map<String, String> dbNameToURLMap = (Map)objMap.get(DB);
+        String verticaUser = (String)objMap.get(USER);
+        String verticaPassword = getPassword(objMap);
+        String verticaDriver = (String)objMap.get(DRIVER);
+
+        for (Map.Entry<String, String> entry: dbNameToURLMap.entrySet()) {
+          DataSource dataSource = new DataSource();
+          dataSource.setInitialSize(INIT_CONNECTIONS);
+          dataSource.setMaxActive(MAX_CONNECTIONS);
+          System.out.println(verticaUser);
 
 Review comment:
   could you remove the print line? 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org