- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
[Sqoop] Using two versions of the same driver - Oracle ojdbc6.jar
- Labels:
-
Apache Sqoop
Created on ‎11-03-2015 06:51 AM - edited ‎09-16-2022 02:47 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am on a CDH 5.4.4 cluster, with parcels.
I need to use sqoop, running it from the edgenode.
My problem is that I need to connect to Oracle 12, which works fine, but now I need to connect to Oracle 9, too.
It seems that Oracle12 ojdbc6.jar no more support Oracle9. I need to download Oracle11's ojdbc6.jar
My question is: how can I make them live toghether ?
- I can't place them on the same folder, because they have the same name.
- Maybe I can change the name of one of them, but the classes contained have the same name: how can I tell Sqoop to use one instead of another at runtime ?
I'm going nuts.
Thank you
Omar
Created ‎11-03-2015 05:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
export HADOOP_CLASSPATH=/path/to/ojdbc6-for-O11.jar
export HADOOP_USER_CLASSPATH_FIRST=true
sqoop …rest of args…
Does this help?
Created ‎11-03-2015 05:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
export HADOOP_CLASSPATH=/path/to/ojdbc6-for-O11.jar
export HADOOP_USER_CLASSPATH_FIRST=true
sqoop …rest of args…
Does this help?
Created ‎11-04-2015 12:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'll try this, a question: will I be missing something overwriting the default hadoop classpath ?
Created ‎11-04-2015 12:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
replace/overwrite it.
To be extra safe though, if you already are using HADOOP_CLASSPATH for
something else, you may also do it this way:
export HADOOP_CLASSPATH=/path/to/O-9.jar:$HADOOP_CLASSPATH
export HADOOP_USER_CLASSPATH_FIRST=true
sqoop …rest of args…
Created ‎11-04-2015 12:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So just to be super-safe, according to the last example if it finds a ojdbc6.jar in both paths, it will load the first one and discard the latter, right ?
Created ‎11-04-2015 12:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
from the earliest classpath entry presenting it), so we are effectively
reordering our classpath to rely on that.
Created ‎11-04-2015 12:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bye
