You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by Ahmad Shahzad <as...@gmail.com> on 2010/07/02 17:21:34 UTC
HOW to COMPILE HADOOP
Hi ALL,
Can anyone tell me that how will i compile the whole hadoop
directory if i add some files to hadoop core directory or i change some code
in some of the files.
Regards,
Ahmad Shahzad
Re: HOW to COMPILE HADOOP
Posted by Steve Loughran <st...@apache.org>.
Owen O'Malley wrote:
> On Fri, Jul 2, 2010 at 8:21 AM, Ahmad Shahzad <as...@gmail.com> wrote:
>> Hi ALL,
>> Can anyone tell me that how will i compile the whole hadoop
>> directory if i add some files to hadoop core directory or i change some code
>> in some of the files.
>
> The directions for the pre-split (ie. 0.20) release is in
>
> http://wiki.apache.org/hadoop/HowToRelease
>
> Post-split is pretty similar.
>
> -- Owen
I documented how I did it via git, which covers repository setup
http://wiki.apache.org/hadoop/GitAndHadoop
Re: HOW to COMPILE HADOOP
Posted by Owen O'Malley <om...@apache.org>.
On Fri, Jul 2, 2010 at 8:21 AM, Ahmad Shahzad <as...@gmail.com> wrote:
> Hi ALL,
> Can anyone tell me that how will i compile the whole hadoop
> directory if i add some files to hadoop core directory or i change some code
> in some of the files.
The directions for the pre-split (ie. 0.20) release is in
http://wiki.apache.org/hadoop/HowToRelease
Post-split is pretty similar.
-- Owen
Re: HOW to COMPILE HADOOP
Posted by Greg Roelofs <ro...@yahoo-inc.com>.
> Can you please explain it further. So, if i add a new java file in suppose,
> src\mapred\org\apache\hadoop\mapred\test.java. than how am i suppose to
> build it? just use ant build.xml ???
build.xml basically has wildcard targets, so adding a *.java file to an
existing source directory will automatically build it (e.g., via "ant
mvn-install").
> And if i change suppose src\mapred\org\apache\hadoop\mapred/TaskTracker.java
> file than how am i suppose to build ?
Same way. It checks (lots of) dependencies, but it will rebuild only the
things that are newer than the corresponding output files. You'll see
"Compiling 1 file" (or something like that) in the output.
Greg
Re: HOW to COMPILE HADOOP
Posted by Steve Loughran <st...@apache.org>.
Ahmad Shahzad wrote:
> So, there can be two things, I can either add a new java file OR i can
> change the existing java files.
>
> Can you please explain it further. So, if i add a new java file in suppose,
> src\mapred\org\apache\hadoop\mapred\test.java. than how am i suppose to
> build it? just use ant build.xml ???
>
> And if i change suppose src\mapred\org\apache\hadoop\mapred/TaskTracker.java
> file than how am i suppose to build ?
>
yes, just like any other ant based project.
Before you get in deep editing the TaskTracker, how much big project
java coding and testing have you done? I don't want to scare you but
Hadoo is big and complex and it's a tricky place to learn your way
around the tools
Re: HOW to COMPILE HADOOP
Posted by Ahmad Shahzad <as...@gmail.com>.
So, there can be two things, I can either add a new java file OR i can
change the existing java files.
Can you please explain it further. So, if i add a new java file in suppose,
src\mapred\org\apache\hadoop\mapred\test.java. than how am i suppose to
build it? just use ant build.xml ???
And if i change suppose src\mapred\org\apache\hadoop\mapred/TaskTracker.java
file than how am i suppose to build ?
Regards,
Ahmad Shahzad
Re: HOW to COMPILE HADOOP
Posted by Harsh J <qw...@gmail.com>.
Use the ant build.xml (and the provided targets) bundled along?
On Fri, Jul 2, 2010 at 8:51 PM, Ahmad Shahzad <as...@gmail.com> wrote:
> Hi ALL,
> Can anyone tell me that how will i compile the whole hadoop
> directory if i add some files to hadoop core directory or i change some code
> in some of the files.
>
> Regards,
> Ahmad Shahzad
>
--
Harsh J
www.harshj.com