[ 
https://issues.apache.org/jira/browse/LENS-123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14906251#comment-14906251
 ] 

Puneet Gupta commented on LENS-123:
-----------------------------------

What if we treat each driver as a plugin and have a separate folder for each 
driver. 
This driver/plugin folder will contain the configuration file and resources 
(jars/etc if needed). To add/remove a driver, simply add remove the folder (no 
need to update any shared file). We can even do these addition/removal/updation 
without server restart(if required).

Pros
1. Plugin like approach 
2. In future , we can support multiple versions of datasource( say two diff 
versions of MySQL dbs .. with their version specific jars/resources in their 
respective driver folder)
3. Common properties for all driver types can be picked form 
<driver-type>driver-default.xml (existing flow)
4.  Minimal code changes. Existing code flow can be used to read the config 
file as there is no change in structure of this file. Only specific directory 
needs to be picked.


Picked the below form Amareshwari's comment on Grill-97. 
----------
When we have more than one driver of type say hive or jdbc, can we identify 
then by names instead of type? For example: lens.server.drivers value can be 
set to uh1_local_hive,uh1_global_hive,uh1_ib_global,uh1_ib_global_backup.

Then the configuration of each driver can be inside the directory named by 
driver name. Then conf directory will look the following:
conf/uh1_local_hive/hivedriver-site.xml
conf/uh1_global_hive/hivedriver-site.xml
conf/uh1_ib_global/jdbcdriver-site.xml
conf/uh1_ib_global_backup/jdbcdriver-site.xml
-----------

 

> Ability to load different instances of same driver class
> --------------------------------------------------------
>
>                 Key: LENS-123
>                 URL: https://issues.apache.org/jira/browse/LENS-123
>             Project: Apache Lens
>          Issue Type: New Feature
>          Components: server
>            Reporter: Amareshwari Sriramadasu
>              Labels: Hackathon-July
>
> Currently we are loading only one driver instance per class. We should be 
> able to load multiple different instances of a driver class.
> For example, There can be multiple HiveDrivers talking to different 
> HiveServers sitting on each colo. Or different JDBCDrivers talking to 
> different dbs.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to