hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mahadev Konar <maha...@hortonworks.com>
Subject Re: Not able to compile 0.23 - may be HADOOP-6614
Date Mon, 21 Nov 2011 17:26:32 GMT
Praveen,
 There is a fix being worked on in HADOOP-7843.

Hope that helps.

thanks
mahadev

On Mon, Nov 21, 2011 at 8:48 AM, Praveen Sripati
<praveensripati@gmail.com> wrote:
> Harsh,
>
> Branch-0.23 has "File workDir;" while the trunk has "final File workDir;"
> in RunJar.java.
>
> For the 0.23 build, should I get the code from branch-0.23 or trunk? I
> thought that the 0.23 release was build from branch-0.23.
>
> Thanks,
> Praveen
>
> On Mon, Nov 21, 2011 at 8:58 PM, Harsh J <harsh@cloudera.com> wrote:
>
>> This appears to have already been fixed since
>> a7654ba4324a1cc831fcef3988d9dca767bcdef3. I can compile the trunk right now
>> -- try a fetch+rebase/pull/up again perhaps?
>>
>> But yes, that value has to be final as the compiler noted.
>>
>> On 21-Nov-2011, at 8:22 PM, Praveen Sripati wrote:
>>
>> > Hi,
>> >
>> > I got the latest code from branch-0.23 and got the below error. Think
>> this
>> > is related to HADOOP-6614.
>> >
>> > [ERROR]
>> >
>> /home/praveensripati/Hadoop/0.23/source/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/RunJar.java:[171,31]
>> > local variable workDir is accessed from within inner class; needs to be
>> > declared final
>> >
>> > The error is around this block
>> >
>> >    Runtime.getRuntime().addShutdownHook(new Thread() {
>> >        public void run() {
>> >          FileUtil.fullyDelete(workDir);
>> >        }
>> >      });
>> >
>> >
>> > JLS says
>> >
>> > http://java.sun.com/docs/books/jls/third_edition/html/classes.html
>> >
>> > Any local variable, formal method parameter or exception handler
>> parameter
>> > used but not declared in an inner class must be declared final. Any local
>> > variable, used but not declared in an inner class must be definitely
>> > assigned (§16) before the body of the inner class.
>> >
>> > Should workDir be declared as final?
>> >
>> > Thanks,
>> > Praveen
>>
>>
>

Mime
View raw message