sqoop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Veena Basavaraj (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SQOOP-1821) External connector loading in Sqoop2
Date Tue, 06 Jan 2015 23:23:34 GMT

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

Veena Basavaraj commented on SQOOP-1821:
----------------------------------------


[~vinothchandar] makes sense

1. Lets define external.connectors.loader=   property that we will use to load the external
jars into sqoop

#option 1:
2. read this property during the tomcat startup and add them to to the WEB-INF/lib folder
( like a manual copy)

 if we see in the below code ( https://github.com/apache/sqoop/blob/sqoop2/tomcat/src/main/java/org/apache/sqoop/tomcat/TomcatToolRunner.java#L70),
all the jars in the WEBINF/lib and WEBINF/classes are put and class loader created for sqoop
{code}
    ClassLoader loader = ClassLoaderFactory.createClassLoader(unpacked, packed, Thread.currentThread().getContextClassLoader());
    Thread.currentThread().setContextClassLoader(loader);
{code}

So the external jars will also be in this path and they will get loaded in the ConnectorManagerUtils
code in the server intiialize.

Option#2

Do not copy these jars to the WEB-INF/lib path, but instead load them via URL class loader
before the ConnectorManagerUtils code is called.






http://mail-archives.apache.org/mod_mbox/sqoop-user/201411.mbox/%3CCAAUkj__NE6--m0FPGiJ0uUE__VoSWSd_AddP=8fXFiuc2YdD_A@mail.gmail.com%3E

> External connector loading in Sqoop2
> ------------------------------------
>
>                 Key: SQOOP-1821
>                 URL: https://issues.apache.org/jira/browse/SQOOP-1821
>             Project: Sqoop
>          Issue Type: Bug
>    Affects Versions: 1.99.5
>            Reporter: Veena Basavaraj
>            Assignee: Veena Basavaraj
>             Fix For: 1.99.5
>
>
> Edit this wiki to begin with
> https://cwiki.apache.org/confluence/display/SQOOP/Setting+up+Sqoop+2#SettingupSqoop2-InstallinganewconnectortoSqoop2
> Also, add the same to the .rst of need be
> relevant code that loads all connectors 
> https://github.com/apache/sqoop/blob/sqoop2/core/src/main/java/org/apache/sqoop/connector/ConnectorManagerUtils.java#L44
> NOTE : External contributors had issues with getting a new sqoop connector working seamlessly
with the Sqoop2. They had to do some hacks to include this new jar into the class path. 



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

Mime
View raw message