Support Questions
Find answers, ask questions, and share your expertise

Sqoop multiple JDBC URL's for failover

Contributor

Is there any way I can provide multiple JDBC connections within the Sqoop command?

For example if JDBC1 is down then Sqoop should pick up JDBC2 and run the import/export.

For example:

sqoop export --connect "jdbc string 1 / jdbc string 2" 

It should then pick the correct JDBC URL based on which on is up and running

Is this possible?

Thanks for any help you can provide,

Dan

3 REPLIES 3

Super Guru

@Daniel Perry I am not aware if this functionality exist. what you can do is put a load balancer in front of the JDBC url. that why the LB takes care of when there is a failover.

Contributor

Thanks for your quick response @Sunile Manjee. Would you be able to provide a quick example of how this looks?

Super Guru

@Daniel Perry There is no code example. It is just a load balancer. Lets say you are using on AWS. You would create a Elastic Load Balancer. The ELB would generate a URL. Then behind the load balancer you would provide the 2 jdbc url. thats it. Now if you want to access your DB via sqoop you would use the ELB URL.

You can also use Apache Camel as a load balancer. More info on setup here.