You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by 김영우 <wa...@gmail.com> on 2011/11/21 15:30:19 UTC

Namespace migrations in 1.4.0 branch

Hi,

As I know, Sqoop committers did namespace migrations in 1.4.0 branch. but I
confused in org.apache.sqoop namespace.

See
https://svn.apache.org/repos/asf/incubator/sqoop/branches/branch-1.4.0/src/java/org/apache/sqoop/manager/MySQLManager.java

Excerpt:
...

import org.apache.hadoop.util.StringUtils;
import com.cloudera.sqoop.SqoopOptions;
import com.cloudera.sqoop.util.ImportException;

/**
 * Manages connections to MySQL databases.
 */
public class MySQLManager
    extends com.cloudera.sqoop.manager.InformationSchemaManager {


I don't know why the class extends a class in com.cloudera.sqoop.*
package. Incomplete migrations?

Please let me know if I missed something.

Thanks,

Youngwoo

Re: Namespace migrations in 1.4.0 branch

Posted by 김영우 <wa...@gmail.com>.
Jarcec,

Got it. Thanks for your explanation.

- Youngwoo

On Tue, Nov 22, 2011 at 12:41 AM, Jarek Jarcec Cecho <ja...@apache.org>wrote:

> Hi Youngwoo,
> thank you very much for your question about correctness of the code. It's
> good to know that somebody is actually checking our work :-)
>
> I've checked this particular file and the inheritance is intentional
> there, it's not a bug. This weird inheritance scheme (classes in apache
> that inherits from cloudera name space) can be seen across entire code base
> and I can imagine how confusing this whole situation is. Please accept my
> apology for that. Reason behind this is need to preserve backward
> compatibility with tools that are already based on sqoop code before 1.4.0
> version without need to change single line of code. In order to fulfil this
> request, we had to preserve inheritance topology - for example that classes
> MySQLManager (in both name spaces) must at some point inherits from class
> ConnManager (from cloudera namespace).
>
> Arvind did excellent job in describing what changes were needed for the
> name space migration, so I would recommend to read his wiki page about that
> for additional details:
>
> https://cwiki.apache.org/confluence/display/SQOOP/Namespace+Migration
>
> Regards,
> Jarcec
>
> On Mon, Nov 21, 2011 at 11:30:19PM +0900, 김영우 wrote:
> > Hi,
> >
> > As I know, Sqoop committers did namespace migrations in 1.4.0 branch.
> but I
> > confused in org.apache.sqoop namespace.
> >
> > See
> >
> https://svn.apache.org/repos/asf/incubator/sqoop/branches/branch-1.4.0/src/java/org/apache/sqoop/manager/MySQLManager.java
> >
> > Excerpt:
> > ...
> >
> > import org.apache.hadoop.util.StringUtils;
> > import com.cloudera.sqoop.SqoopOptions;
> > import com.cloudera.sqoop.util.ImportException;
> >
> > /**
> >  * Manages connections to MySQL databases.
> >  */
> > public class MySQLManager
> >     extends com.cloudera.sqoop.manager.InformationSchemaManager {
> >
> >
> > I don't know why the class extends a class in com.cloudera.sqoop.*
> > package. Incomplete migrations?
> >
> > Please let me know if I missed something.
> >
> > Thanks,
> >
> > Youngwoo
>

Re: Namespace migrations in 1.4.0 branch

Posted by Jarek Jarcec Cecho <ja...@apache.org>.
Hi Youngwoo,
thank you very much for your question about correctness of the code. It's good to know that somebody is actually checking our work :-) 

I've checked this particular file and the inheritance is intentional there, it's not a bug. This weird inheritance scheme (classes in apache that inherits from cloudera name space) can be seen across entire code base and I can imagine how confusing this whole situation is. Please accept my apology for that. Reason behind this is need to preserve backward compatibility with tools that are already based on sqoop code before 1.4.0 version without need to change single line of code. In order to fulfil this request, we had to preserve inheritance topology - for example that classes MySQLManager (in both name spaces) must at some point inherits from class ConnManager (from cloudera namespace). 

Arvind did excellent job in describing what changes were needed for the name space migration, so I would recommend to read his wiki page about that for additional details:

https://cwiki.apache.org/confluence/display/SQOOP/Namespace+Migration

Regards,
Jarcec

On Mon, Nov 21, 2011 at 11:30:19PM +0900, 김영우 wrote:
> Hi,
> 
> As I know, Sqoop committers did namespace migrations in 1.4.0 branch. but I
> confused in org.apache.sqoop namespace.
> 
> See
> https://svn.apache.org/repos/asf/incubator/sqoop/branches/branch-1.4.0/src/java/org/apache/sqoop/manager/MySQLManager.java
> 
> Excerpt:
> ...
> 
> import org.apache.hadoop.util.StringUtils;
> import com.cloudera.sqoop.SqoopOptions;
> import com.cloudera.sqoop.util.ImportException;
> 
> /**
>  * Manages connections to MySQL databases.
>  */
> public class MySQLManager
>     extends com.cloudera.sqoop.manager.InformationSchemaManager {
> 
> 
> I don't know why the class extends a class in com.cloudera.sqoop.*
> package. Incomplete migrations?
> 
> Please let me know if I missed something.
> 
> Thanks,
> 
> Youngwoo