You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by Zhao Hong <zh...@gmail.com> on 2012/12/20 13:36:35 UTC
How to compile sqoop
Hi,
I compiled branch-1.4.2 of sqoop with the command below.
ant jar-all -Dhadoopverion=20
and the result is totally successful.
When I try to import some data from oracle database using the sqoop that I
built , I got the exception : "Exception in thread "main"
java.lang.IncompatibleClassChangeError: Found class
org.apache.hadoop.mapreduce.JobContext, but interface was expected."
I cant get the right result when run the same command using the sqoop from
the org and my hadoop version is hadoop-0.20.2-cdh3u2.
So, my question is how should I compile the sqoop to work with my hadoop.
Thanks & Regards.
Hong
Re: How to compile sqoop
Posted by vasanth kumar <rj...@gmail.com>.
Thanks Aravind :) I followed your steps and got.
On Mon, Dec 24, 2012 at 11:52 AM, Alexander Alten-Lorenz <
wget.null@gmail.com> wrote:
> Thanks, Arvind. I'll include this in the wiki today.
>
> Best,
> Alex
>
>
> On Dec 23, 2012, at 7:55 PM, vasanth kumar <r
> j.vasanthkumar@gmail.com> wrote:
>
> > Hi,
> > I am using Sqoop2. I got sources from GIT and maven build working fine.
> But
> > for setting up the development environment for eclipse. I tried "mvn
> > eclipse:eclipse" classpath is not resolving. .classpath file is created
> in
> > each module. How to combine all module .classpath? Kindly help for
> setting
> > dev environment.
> >
> >
> > On Fri, Dec 21, 2012 at 12:01 PM, Alexander Alten-Lorenz <
> > wget.null@gmail.com> wrote:
> >
> >>
> >> Hi Hong,
> >>
> >> got it.
> >> Before you start a new build you should clean out the older one with:
> "ant
> >> clean all". This will erase all artifacts and builded jars in your
> project.
> >>
> >> Hope it helps,
> >> Alex
> >>
> >>
> >> On Dec 21, 2012, at 4:28 AM, Zhao Hong <zh...@gmail.com> wrote:
> >>
> >>> Hi Alexander,
> >>>
> >>> My hadoop cluster version is hadoop-0.20.2-cdh3u2.
> >>> I compile the hadoop by myself cause that I want to study on it .
> >>>
> >>> Regards,
> >>> Hong
> >>>
> >>>
> >>> On Thu, Dec 20, 2012 at 10:44 PM, Alexander Alten-Lorenz <
> >>> wget.null@gmail.com> wrote:
> >>>
> >>>> Why you don't use the Apache sqoop versions:
> >>>> http://apache.imsam.info/sqoop/1.4.2/
> >>>>
> >>>> Or, when you want to build Sqoop by yourself edit the buid.xml as
> >>>> described in https://issues.apache.org/jira/browse/SQOOP-384
> >>>>
> >>>> Best,
> >>>> Alex
> >>>>
> >>>> On Dec 20, 2012, at 1:38 PM, Zhao Hong <zh...@gmail.com> wrote:
> >>>>
> >>>>> Sorry for the wrong word. I can get the right result when run the
> >> same
> >>>>> command using the sqoop from the org.
> >>>>>
> >>>>>
> >>>>> On Thu, Dec 20, 2012 at 8:36 PM, Zhao Hong <zh...@gmail.com>
> >>>> wrote:
> >>>>>
> >>>>>> Hi,
> >>>>>> I compiled branch-1.4.2 of sqoop with the command below.
> >>>>>> ant jar-all -Dhadoopverion=20
> >>>>>> and the result is totally successful.
> >>>>>>
> >>>>>> When I try to import some data from oracle database using the sqoop
> >>>> that
> >>>>>> I built , I got the exception : "Exception in thread "main"
> >>>>>> java.lang.IncompatibleClassChangeError: Found class
> >>>>>> org.apache.hadoop.mapreduce.JobContext, but interface was expected."
> >>>>>>
> >>>>>> I cant get the right result when run the same command using the
> sqoop
> >>>> from
> >>>>>> the org and my hadoop version is hadoop-0.20.2-cdh3u2.
> >>>>>>
> >>>>>> So, my question is how should I compile the sqoop to work with my
> >>>> hadoop.
> >>>>>>
> >>>>>> Thanks & Regards.
> >>>>>>
> >>>>>> Hong
> >>>>>>
> >>>>>>
> >>>>
> >>>>
> >>
> >>
> >
> >
> > --
> > Regards
> > Vasanth kumar RJ
>
>
--
Regards
Vasanth kumar RJ
Re: How to compile sqoop
Posted by Alexander Alten-Lorenz <wg...@gmail.com>.
Thanks, Arvind. I'll include this in the wiki today.
Best,
Alex
On Dec 23, 2012, at 7:55 PM, vasanth kumar <r
j.vasanthkumar@gmail.com> wrote:
> Hi,
> I am using Sqoop2. I got sources from GIT and maven build working fine. But
> for setting up the development environment for eclipse. I tried "mvn
> eclipse:eclipse" classpath is not resolving. .classpath file is created in
> each module. How to combine all module .classpath? Kindly help for setting
> dev environment.
>
>
> On Fri, Dec 21, 2012 at 12:01 PM, Alexander Alten-Lorenz <
> wget.null@gmail.com> wrote:
>
>>
>> Hi Hong,
>>
>> got it.
>> Before you start a new build you should clean out the older one with: "ant
>> clean all". This will erase all artifacts and builded jars in your project.
>>
>> Hope it helps,
>> Alex
>>
>>
>> On Dec 21, 2012, at 4:28 AM, Zhao Hong <zh...@gmail.com> wrote:
>>
>>> Hi Alexander,
>>>
>>> My hadoop cluster version is hadoop-0.20.2-cdh3u2.
>>> I compile the hadoop by myself cause that I want to study on it .
>>>
>>> Regards,
>>> Hong
>>>
>>>
>>> On Thu, Dec 20, 2012 at 10:44 PM, Alexander Alten-Lorenz <
>>> wget.null@gmail.com> wrote:
>>>
>>>> Why you don't use the Apache sqoop versions:
>>>> http://apache.imsam.info/sqoop/1.4.2/
>>>>
>>>> Or, when you want to build Sqoop by yourself edit the buid.xml as
>>>> described in https://issues.apache.org/jira/browse/SQOOP-384
>>>>
>>>> Best,
>>>> Alex
>>>>
>>>> On Dec 20, 2012, at 1:38 PM, Zhao Hong <zh...@gmail.com> wrote:
>>>>
>>>>> Sorry for the wrong word. I can get the right result when run the
>> same
>>>>> command using the sqoop from the org.
>>>>>
>>>>>
>>>>> On Thu, Dec 20, 2012 at 8:36 PM, Zhao Hong <zh...@gmail.com>
>>>> wrote:
>>>>>
>>>>>> Hi,
>>>>>> I compiled branch-1.4.2 of sqoop with the command below.
>>>>>> ant jar-all -Dhadoopverion=20
>>>>>> and the result is totally successful.
>>>>>>
>>>>>> When I try to import some data from oracle database using the sqoop
>>>> that
>>>>>> I built , I got the exception : "Exception in thread "main"
>>>>>> java.lang.IncompatibleClassChangeError: Found class
>>>>>> org.apache.hadoop.mapreduce.JobContext, but interface was expected."
>>>>>>
>>>>>> I cant get the right result when run the same command using the sqoop
>>>> from
>>>>>> the org and my hadoop version is hadoop-0.20.2-cdh3u2.
>>>>>>
>>>>>> So, my question is how should I compile the sqoop to work with my
>>>> hadoop.
>>>>>>
>>>>>> Thanks & Regards.
>>>>>>
>>>>>> Hong
>>>>>>
>>>>>>
>>>>
>>>>
>>
>>
>
>
> --
> Regards
> Vasanth kumar RJ
Re: How to compile sqoop
Posted by Arvind Prabhakar <ar...@apache.org>.
Hi Vasanth,
Once you have run mvn eclipse:eclipse successfully, you can import the
projects into eclipse by going to File > Import... > General > Existing
Projects into Workspace > Next. In the next wizard window, click the browse
button next to "Select root directory" and browse to the root of the
workspace from where you have checked out sqoop2. This will populate about
10 projects into your workspace - all of which are different modules within
Sqoop 2 (See the attached screen shot). Click Finish button to get these
projects into the workspace and start working.
Note - if this is the first time you are setting up eclipse for a maven
project, the import will show you class path problems due to missing
variable M2_REPO (Unbound classpath variable: 'M2_REPO/...). To fix this
error, go to Preferences > Java > Build Path > Classpath Variables. Click
on New..., enter name M2_REPO, click on Folder and browse upto the
directory ~/.m2/repository. Click OK and close the preferences dialog. This
will force the rebuild of the workspace and all projects should turn green.
Regards,
Arvind
On Sun, Dec 23, 2012 at 1:24 PM, Jarek Jarcec Cecho <ja...@apache.org>wrote:
> Hi Vasanth,
> I'm not using eclipse, so I'm not sure.
>
> If you will be able to solve the issue, please do not hesitate to share a
> patch or instructions. I'm pretty sure that it might help other people as
> well.
>
> Jarcec
>
> On Mon, Dec 24, 2012 at 12:25:14AM +0530, vasanth kumar wrote:
> > Hi,
> > I am using Sqoop2. I got sources from GIT and maven build working fine.
> But
> > for setting up the development environment for eclipse. I tried "mvn
> > eclipse:eclipse" classpath is not resolving. .classpath file is created
> in
> > each module. How to combine all module .classpath? Kindly help for
> setting
> > dev environment.
> >
> >
> > On Fri, Dec 21, 2012 at 12:01 PM, Alexander Alten-Lorenz <
> > wget.null@gmail.com> wrote:
> >
> > >
> > > Hi Hong,
> > >
> > > got it.
> > > Before you start a new build you should clean out the older one with:
> "ant
> > > clean all". This will erase all artifacts and builded jars in your
> project.
> > >
> > > Hope it helps,
> > > Alex
> > >
> > >
> > > On Dec 21, 2012, at 4:28 AM, Zhao Hong <zh...@gmail.com> wrote:
> > >
> > > > Hi Alexander,
> > > >
> > > > My hadoop cluster version is hadoop-0.20.2-cdh3u2.
> > > > I compile the hadoop by myself cause that I want to study on it .
> > > >
> > > > Regards,
> > > > Hong
> > > >
> > > >
> > > > On Thu, Dec 20, 2012 at 10:44 PM, Alexander Alten-Lorenz <
> > > > wget.null@gmail.com> wrote:
> > > >
> > > >> Why you don't use the Apache sqoop versions:
> > > >> http://apache.imsam.info/sqoop/1.4.2/
> > > >>
> > > >> Or, when you want to build Sqoop by yourself edit the buid.xml as
> > > >> described in https://issues.apache.org/jira/browse/SQOOP-384
> > > >>
> > > >> Best,
> > > >> Alex
> > > >>
> > > >> On Dec 20, 2012, at 1:38 PM, Zhao Hong <zh...@gmail.com>
> wrote:
> > > >>
> > > >>> Sorry for the wrong word. I can get the right result when run the
> > > same
> > > >>> command using the sqoop from the org.
> > > >>>
> > > >>>
> > > >>> On Thu, Dec 20, 2012 at 8:36 PM, Zhao Hong <zh...@gmail.com>
> > > >> wrote:
> > > >>>
> > > >>>> Hi,
> > > >>>> I compiled branch-1.4.2 of sqoop with the command below.
> > > >>>> ant jar-all -Dhadoopverion=20
> > > >>>> and the result is totally successful.
> > > >>>>
> > > >>>> When I try to import some data from oracle database using the
> sqoop
> > > >> that
> > > >>>> I built , I got the exception : "Exception in thread "main"
> > > >>>> java.lang.IncompatibleClassChangeError: Found class
> > > >>>> org.apache.hadoop.mapreduce.JobContext, but interface was
> expected."
> > > >>>>
> > > >>>> I cant get the right result when run the same command using the
> sqoop
> > > >> from
> > > >>>> the org and my hadoop version is hadoop-0.20.2-cdh3u2.
> > > >>>>
> > > >>>> So, my question is how should I compile the sqoop to work with my
> > > >> hadoop.
> > > >>>>
> > > >>>> Thanks & Regards.
> > > >>>>
> > > >>>> Hong
> > > >>>>
> > > >>>>
> > > >>
> > > >>
> > >
> > >
> >
> >
> > --
> > Regards
> > Vasanth kumar RJ
>
Re: How to compile sqoop
Posted by Jarek Jarcec Cecho <ja...@apache.org>.
Hi Vasanth,
I'm not using eclipse, so I'm not sure.
If you will be able to solve the issue, please do not hesitate to share a patch or instructions. I'm pretty sure that it might help other people as well.
Jarcec
On Mon, Dec 24, 2012 at 12:25:14AM +0530, vasanth kumar wrote:
> Hi,
> I am using Sqoop2. I got sources from GIT and maven build working fine. But
> for setting up the development environment for eclipse. I tried "mvn
> eclipse:eclipse" classpath is not resolving. .classpath file is created in
> each module. How to combine all module .classpath? Kindly help for setting
> dev environment.
>
>
> On Fri, Dec 21, 2012 at 12:01 PM, Alexander Alten-Lorenz <
> wget.null@gmail.com> wrote:
>
> >
> > Hi Hong,
> >
> > got it.
> > Before you start a new build you should clean out the older one with: "ant
> > clean all". This will erase all artifacts and builded jars in your project.
> >
> > Hope it helps,
> > Alex
> >
> >
> > On Dec 21, 2012, at 4:28 AM, Zhao Hong <zh...@gmail.com> wrote:
> >
> > > Hi Alexander,
> > >
> > > My hadoop cluster version is hadoop-0.20.2-cdh3u2.
> > > I compile the hadoop by myself cause that I want to study on it .
> > >
> > > Regards,
> > > Hong
> > >
> > >
> > > On Thu, Dec 20, 2012 at 10:44 PM, Alexander Alten-Lorenz <
> > > wget.null@gmail.com> wrote:
> > >
> > >> Why you don't use the Apache sqoop versions:
> > >> http://apache.imsam.info/sqoop/1.4.2/
> > >>
> > >> Or, when you want to build Sqoop by yourself edit the buid.xml as
> > >> described in https://issues.apache.org/jira/browse/SQOOP-384
> > >>
> > >> Best,
> > >> Alex
> > >>
> > >> On Dec 20, 2012, at 1:38 PM, Zhao Hong <zh...@gmail.com> wrote:
> > >>
> > >>> Sorry for the wrong word. I can get the right result when run the
> > same
> > >>> command using the sqoop from the org.
> > >>>
> > >>>
> > >>> On Thu, Dec 20, 2012 at 8:36 PM, Zhao Hong <zh...@gmail.com>
> > >> wrote:
> > >>>
> > >>>> Hi,
> > >>>> I compiled branch-1.4.2 of sqoop with the command below.
> > >>>> ant jar-all -Dhadoopverion=20
> > >>>> and the result is totally successful.
> > >>>>
> > >>>> When I try to import some data from oracle database using the sqoop
> > >> that
> > >>>> I built , I got the exception : "Exception in thread "main"
> > >>>> java.lang.IncompatibleClassChangeError: Found class
> > >>>> org.apache.hadoop.mapreduce.JobContext, but interface was expected."
> > >>>>
> > >>>> I cant get the right result when run the same command using the sqoop
> > >> from
> > >>>> the org and my hadoop version is hadoop-0.20.2-cdh3u2.
> > >>>>
> > >>>> So, my question is how should I compile the sqoop to work with my
> > >> hadoop.
> > >>>>
> > >>>> Thanks & Regards.
> > >>>>
> > >>>> Hong
> > >>>>
> > >>>>
> > >>
> > >>
> >
> >
>
>
> --
> Regards
> Vasanth kumar RJ
Re: How to compile sqoop
Posted by vasanth kumar <rj...@gmail.com>.
Hi,
I am using Sqoop2. I got sources from GIT and maven build working fine. But
for setting up the development environment for eclipse. I tried "mvn
eclipse:eclipse" classpath is not resolving. .classpath file is created in
each module. How to combine all module .classpath? Kindly help for setting
dev environment.
On Fri, Dec 21, 2012 at 12:01 PM, Alexander Alten-Lorenz <
wget.null@gmail.com> wrote:
>
> Hi Hong,
>
> got it.
> Before you start a new build you should clean out the older one with: "ant
> clean all". This will erase all artifacts and builded jars in your project.
>
> Hope it helps,
> Alex
>
>
> On Dec 21, 2012, at 4:28 AM, Zhao Hong <zh...@gmail.com> wrote:
>
> > Hi Alexander,
> >
> > My hadoop cluster version is hadoop-0.20.2-cdh3u2.
> > I compile the hadoop by myself cause that I want to study on it .
> >
> > Regards,
> > Hong
> >
> >
> > On Thu, Dec 20, 2012 at 10:44 PM, Alexander Alten-Lorenz <
> > wget.null@gmail.com> wrote:
> >
> >> Why you don't use the Apache sqoop versions:
> >> http://apache.imsam.info/sqoop/1.4.2/
> >>
> >> Or, when you want to build Sqoop by yourself edit the buid.xml as
> >> described in https://issues.apache.org/jira/browse/SQOOP-384
> >>
> >> Best,
> >> Alex
> >>
> >> On Dec 20, 2012, at 1:38 PM, Zhao Hong <zh...@gmail.com> wrote:
> >>
> >>> Sorry for the wrong word. I can get the right result when run the
> same
> >>> command using the sqoop from the org.
> >>>
> >>>
> >>> On Thu, Dec 20, 2012 at 8:36 PM, Zhao Hong <zh...@gmail.com>
> >> wrote:
> >>>
> >>>> Hi,
> >>>> I compiled branch-1.4.2 of sqoop with the command below.
> >>>> ant jar-all -Dhadoopverion=20
> >>>> and the result is totally successful.
> >>>>
> >>>> When I try to import some data from oracle database using the sqoop
> >> that
> >>>> I built , I got the exception : "Exception in thread "main"
> >>>> java.lang.IncompatibleClassChangeError: Found class
> >>>> org.apache.hadoop.mapreduce.JobContext, but interface was expected."
> >>>>
> >>>> I cant get the right result when run the same command using the sqoop
> >> from
> >>>> the org and my hadoop version is hadoop-0.20.2-cdh3u2.
> >>>>
> >>>> So, my question is how should I compile the sqoop to work with my
> >> hadoop.
> >>>>
> >>>> Thanks & Regards.
> >>>>
> >>>> Hong
> >>>>
> >>>>
> >>
> >>
>
>
--
Regards
Vasanth kumar RJ
Re: How to compile sqoop
Posted by Alexander Alten-Lorenz <wg...@gmail.com>.
Hi Hong,
got it.
Before you start a new build you should clean out the older one with: "ant clean all". This will erase all artifacts and builded jars in your project.
Hope it helps,
Alex
On Dec 21, 2012, at 4:28 AM, Zhao Hong <zh...@gmail.com> wrote:
> Hi Alexander,
>
> My hadoop cluster version is hadoop-0.20.2-cdh3u2.
> I compile the hadoop by myself cause that I want to study on it .
>
> Regards,
> Hong
>
>
> On Thu, Dec 20, 2012 at 10:44 PM, Alexander Alten-Lorenz <
> wget.null@gmail.com> wrote:
>
>> Why you don't use the Apache sqoop versions:
>> http://apache.imsam.info/sqoop/1.4.2/
>>
>> Or, when you want to build Sqoop by yourself edit the buid.xml as
>> described in https://issues.apache.org/jira/browse/SQOOP-384
>>
>> Best,
>> Alex
>>
>> On Dec 20, 2012, at 1:38 PM, Zhao Hong <zh...@gmail.com> wrote:
>>
>>> Sorry for the wrong word. I can get the right result when run the same
>>> command using the sqoop from the org.
>>>
>>>
>>> On Thu, Dec 20, 2012 at 8:36 PM, Zhao Hong <zh...@gmail.com>
>> wrote:
>>>
>>>> Hi,
>>>> I compiled branch-1.4.2 of sqoop with the command below.
>>>> ant jar-all -Dhadoopverion=20
>>>> and the result is totally successful.
>>>>
>>>> When I try to import some data from oracle database using the sqoop
>> that
>>>> I built , I got the exception : "Exception in thread "main"
>>>> java.lang.IncompatibleClassChangeError: Found class
>>>> org.apache.hadoop.mapreduce.JobContext, but interface was expected."
>>>>
>>>> I cant get the right result when run the same command using the sqoop
>> from
>>>> the org and my hadoop version is hadoop-0.20.2-cdh3u2.
>>>>
>>>> So, my question is how should I compile the sqoop to work with my
>> hadoop.
>>>>
>>>> Thanks & Regards.
>>>>
>>>> Hong
>>>>
>>>>
>>
>>
Re: How to compile sqoop
Posted by Zhao Hong <zh...@gmail.com>.
Hi Alexander,
My hadoop cluster version is hadoop-0.20.2-cdh3u2.
I compile the hadoop by myself cause that I want to study on it .
Regards,
Hong
On Thu, Dec 20, 2012 at 10:44 PM, Alexander Alten-Lorenz <
wget.null@gmail.com> wrote:
> Why you don't use the Apache sqoop versions:
> http://apache.imsam.info/sqoop/1.4.2/
>
> Or, when you want to build Sqoop by yourself edit the buid.xml as
> described in https://issues.apache.org/jira/browse/SQOOP-384
>
> Best,
> Alex
>
> On Dec 20, 2012, at 1:38 PM, Zhao Hong <zh...@gmail.com> wrote:
>
> > Sorry for the wrong word. I can get the right result when run the same
> > command using the sqoop from the org.
> >
> >
> > On Thu, Dec 20, 2012 at 8:36 PM, Zhao Hong <zh...@gmail.com>
> wrote:
> >
> >> Hi,
> >> I compiled branch-1.4.2 of sqoop with the command below.
> >> ant jar-all -Dhadoopverion=20
> >> and the result is totally successful.
> >>
> >> When I try to import some data from oracle database using the sqoop
> that
> >> I built , I got the exception : "Exception in thread "main"
> >> java.lang.IncompatibleClassChangeError: Found class
> >> org.apache.hadoop.mapreduce.JobContext, but interface was expected."
> >>
> >> I cant get the right result when run the same command using the sqoop
> from
> >> the org and my hadoop version is hadoop-0.20.2-cdh3u2.
> >>
> >> So, my question is how should I compile the sqoop to work with my
> hadoop.
> >>
> >> Thanks & Regards.
> >>
> >> Hong
> >>
> >>
>
>
Re: How to compile sqoop
Posted by Alexander Alten-Lorenz <wg...@gmail.com>.
Why you don't use the Apache sqoop versions:
http://apache.imsam.info/sqoop/1.4.2/
Or, when you want to build Sqoop by yourself edit the buid.xml as described in https://issues.apache.org/jira/browse/SQOOP-384
Best,
Alex
On Dec 20, 2012, at 1:38 PM, Zhao Hong <zh...@gmail.com> wrote:
> Sorry for the wrong word. I can get the right result when run the same
> command using the sqoop from the org.
>
>
> On Thu, Dec 20, 2012 at 8:36 PM, Zhao Hong <zh...@gmail.com> wrote:
>
>> Hi,
>> I compiled branch-1.4.2 of sqoop with the command below.
>> ant jar-all -Dhadoopverion=20
>> and the result is totally successful.
>>
>> When I try to import some data from oracle database using the sqoop that
>> I built , I got the exception : "Exception in thread "main"
>> java.lang.IncompatibleClassChangeError: Found class
>> org.apache.hadoop.mapreduce.JobContext, but interface was expected."
>>
>> I cant get the right result when run the same command using the sqoop from
>> the org and my hadoop version is hadoop-0.20.2-cdh3u2.
>>
>> So, my question is how should I compile the sqoop to work with my hadoop.
>>
>> Thanks & Regards.
>>
>> Hong
>>
>>
Re: How to compile sqoop
Posted by Zhao Hong <zh...@gmail.com>.
Sorry for the wrong word. I can get the right result when run the same
command using the sqoop from the org.
On Thu, Dec 20, 2012 at 8:36 PM, Zhao Hong <zh...@gmail.com> wrote:
> Hi,
> I compiled branch-1.4.2 of sqoop with the command below.
> ant jar-all -Dhadoopverion=20
> and the result is totally successful.
>
> When I try to import some data from oracle database using the sqoop that
> I built , I got the exception : "Exception in thread "main"
> java.lang.IncompatibleClassChangeError: Found class
> org.apache.hadoop.mapreduce.JobContext, but interface was expected."
>
> I cant get the right result when run the same command using the sqoop from
> the org and my hadoop version is hadoop-0.20.2-cdh3u2.
>
> So, my question is how should I compile the sqoop to work with my hadoop.
>
> Thanks & Regards.
>
> Hong
>
>
Re: How to compile sqoop
Posted by Zhao Hong <zh...@gmail.com>.
Hi Jarcec,
Thanks for your reply.
"hadoopverion" is a slip. I do use "-Dhadoopversion=20" and the
exception is still there.
My Hadoop Cluster version: hadoop-0.20.2-cdh3u2
Regards,
Hong
On Thu, Dec 20, 2012 at 10:56 PM, Jarek Jarcec Cecho <ja...@apache.org>wrote:
> Hi Zhao,
> the exception you're seeing is typical when Sqoop was compiled for
> different Hadoop version that you're running on your cluster.
>
> Sqoop by default is compiling for hadoop 23. You can change that by
> passing property -Dhadoopversion=20 as you tried to do. Unfortunately it
> seems to me that you have typo in your command and you have "hadoopverion"
> instead of "hadoopversion". You can check ant log for hadoop version that
> build is using in order to be sure that you're building against version
> that you need to.
>
> I would recommend to rebuild the project in case that you change the
> hadoopversion parameter to force ant recompile all the classing again:
>
> ant clean jar-all -Dhadoopversion=20
>
> Jarcec
>
> On Dec 20, 2012, at 4:36 AM, Zhao Hong <zh...@gmail.com> wrote:
>
> > Hi,
> > I compiled branch-1.4.2 of sqoop with the command below.
> > ant jar-all -Dhadoopverion=20
> > and the result is totally successful.
> >
> > When I try to import some data from oracle database using the sqoop
> that I
> > built , I got the exception : "Exception in thread "main"
> > java.lang.IncompatibleClassChangeError: Found class
> > org.apache.hadoop.mapreduce.JobContext, but interface was expected."
> >
> > I cant get the right result when run the same command using the sqoop
> from
> > the org and my hadoop version is hadoop-0.20.2-cdh3u2.
> >
> > So, my question is how should I compile the sqoop to work with my hadoop.
> >
> > Thanks & Regards.
> >
> > Hong
>
>
Re: How to compile sqoop
Posted by Zhao Hong <zh...@gmail.com>.
Thanks again, It works now when using "ant clean jar-all
-Dhadoopversion=20".
Regards,
Hong
On Thu, Dec 20, 2012 at 10:56 PM, Jarek Jarcec Cecho <ja...@apache.org>wrote:
> Hi Zhao,
> the exception you're seeing is typical when Sqoop was compiled for
> different Hadoop version that you're running on your cluster.
>
> Sqoop by default is compiling for hadoop 23. You can change that by
> passing property -Dhadoopversion=20 as you tried to do. Unfortunately it
> seems to me that you have typo in your command and you have "hadoopverion"
> instead of "hadoopversion". You can check ant log for hadoop version that
> build is using in order to be sure that you're building against version
> that you need to.
>
> I would recommend to rebuild the project in case that you change the
> hadoopversion parameter to force ant recompile all the classing again:
>
> ant clean jar-all -Dhadoopversion=20
>
> Jarcec
>
> On Dec 20, 2012, at 4:36 AM, Zhao Hong <zh...@gmail.com> wrote:
>
> > Hi,
> > I compiled branch-1.4.2 of sqoop with the command below.
> > ant jar-all -Dhadoopverion=20
> > and the result is totally successful.
> >
> > When I try to import some data from oracle database using the sqoop
> that I
> > built , I got the exception : "Exception in thread "main"
> > java.lang.IncompatibleClassChangeError: Found class
> > org.apache.hadoop.mapreduce.JobContext, but interface was expected."
> >
> > I cant get the right result when run the same command using the sqoop
> from
> > the org and my hadoop version is hadoop-0.20.2-cdh3u2.
> >
> > So, my question is how should I compile the sqoop to work with my hadoop.
> >
> > Thanks & Regards.
> >
> > Hong
>
>
Re: How to compile sqoop
Posted by Jarek Jarcec Cecho <ja...@apache.org>.
Hi Zhao,
the exception you're seeing is typical when Sqoop was compiled for different Hadoop version that you're running on your cluster.
Sqoop by default is compiling for hadoop 23. You can change that by passing property -Dhadoopversion=20 as you tried to do. Unfortunately it seems to me that you have typo in your command and you have "hadoopverion" instead of "hadoopversion". You can check ant log for hadoop version that build is using in order to be sure that you're building against version that you need to.
I would recommend to rebuild the project in case that you change the hadoopversion parameter to force ant recompile all the classing again:
ant clean jar-all -Dhadoopversion=20
Jarcec
On Dec 20, 2012, at 4:36 AM, Zhao Hong <zh...@gmail.com> wrote:
> Hi,
> I compiled branch-1.4.2 of sqoop with the command below.
> ant jar-all -Dhadoopverion=20
> and the result is totally successful.
>
> When I try to import some data from oracle database using the sqoop that I
> built , I got the exception : "Exception in thread "main"
> java.lang.IncompatibleClassChangeError: Found class
> org.apache.hadoop.mapreduce.JobContext, but interface was expected."
>
> I cant get the right result when run the same command using the sqoop from
> the org and my hadoop version is hadoop-0.20.2-cdh3u2.
>
> So, my question is how should I compile the sqoop to work with my hadoop.
>
> Thanks & Regards.
>
> Hong