You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Mark Kerzner <ma...@shmsoft.com> on 2012/09/04 04:13:47 UTC

Hadoop examples don't compile in Eclipse

Hi,

this is really all over, but for example, in SecondarySort.java, this line
causes a problem:

@Override
        public int compare(IntPair o1, IntPair o2) {

It works beautifully in NB, but in Eclipse it was the "Override" removed,
with the following message:

Multiple markers at this line
    - The method compare(SecondarySort.IntPair, SecondarySort.IntPair) of
     type SecondarySort.FirstGroupingComparator must override a superclass
     method
    - implements
     java.util.Comparator<
com.intel.hadooptraining.examples.SecondarySort.Int
     Pair>.compare

Thank you,
Mark

Re: Hadoop examples don't compile in Eclipse

Posted by Mark Kerzner <ma...@shmsoft.com>.
Indeed, Stan, it worked.

Thank you,
Mark

On Mon, Sep 3, 2012 at 9:42 PM, Stan Rosenberg <st...@gmail.com>wrote:

> Hi Mark,
>
> Make sure that you enable java 1.6 for your project.  More info is
> available here:
>
> http://stackoverflow.com/questions/987973/why-does-eclipse-complain-about-override-on-interface-methods
>
> stan
>
> On Mon, Sep 3, 2012 at 10:13 PM, Mark Kerzner <ma...@shmsoft.com>
> wrote:
> > Hi,
> >
> > this is really all over, but for example, in SecondarySort.java, this
> line
> > causes a problem:
> >
> > @Override
> >         public int compare(IntPair o1, IntPair o2) {
> >
> > It works beautifully in NB, but in Eclipse it was the "Override" removed,
> > with the following message:
> >
> > Multiple markers at this line
> >     - The method compare(SecondarySort.IntPair, SecondarySort.IntPair) of
> >      type SecondarySort.FirstGroupingComparator must override a
> superclass
> >      method
> >     - implements
> >
> > java.util.Comparator<com.intel.hadooptraining.examples.SecondarySort.Int
> >      Pair>.compare
> >
> > Thank you,
> > Mark
>

Re: Hadoop examples don't compile in Eclipse

Posted by Mark Kerzner <ma...@shmsoft.com>.
Indeed, Stan, it worked.

Thank you,
Mark

On Mon, Sep 3, 2012 at 9:42 PM, Stan Rosenberg <st...@gmail.com>wrote:

> Hi Mark,
>
> Make sure that you enable java 1.6 for your project.  More info is
> available here:
>
> http://stackoverflow.com/questions/987973/why-does-eclipse-complain-about-override-on-interface-methods
>
> stan
>
> On Mon, Sep 3, 2012 at 10:13 PM, Mark Kerzner <ma...@shmsoft.com>
> wrote:
> > Hi,
> >
> > this is really all over, but for example, in SecondarySort.java, this
> line
> > causes a problem:
> >
> > @Override
> >         public int compare(IntPair o1, IntPair o2) {
> >
> > It works beautifully in NB, but in Eclipse it was the "Override" removed,
> > with the following message:
> >
> > Multiple markers at this line
> >     - The method compare(SecondarySort.IntPair, SecondarySort.IntPair) of
> >      type SecondarySort.FirstGroupingComparator must override a
> superclass
> >      method
> >     - implements
> >
> > java.util.Comparator<com.intel.hadooptraining.examples.SecondarySort.Int
> >      Pair>.compare
> >
> > Thank you,
> > Mark
>

Re: Hadoop examples don't compile in Eclipse

Posted by Mark Kerzner <ma...@shmsoft.com>.
Indeed, Stan, it worked.

Thank you,
Mark

On Mon, Sep 3, 2012 at 9:42 PM, Stan Rosenberg <st...@gmail.com>wrote:

> Hi Mark,
>
> Make sure that you enable java 1.6 for your project.  More info is
> available here:
>
> http://stackoverflow.com/questions/987973/why-does-eclipse-complain-about-override-on-interface-methods
>
> stan
>
> On Mon, Sep 3, 2012 at 10:13 PM, Mark Kerzner <ma...@shmsoft.com>
> wrote:
> > Hi,
> >
> > this is really all over, but for example, in SecondarySort.java, this
> line
> > causes a problem:
> >
> > @Override
> >         public int compare(IntPair o1, IntPair o2) {
> >
> > It works beautifully in NB, but in Eclipse it was the "Override" removed,
> > with the following message:
> >
> > Multiple markers at this line
> >     - The method compare(SecondarySort.IntPair, SecondarySort.IntPair) of
> >      type SecondarySort.FirstGroupingComparator must override a
> superclass
> >      method
> >     - implements
> >
> > java.util.Comparator<com.intel.hadooptraining.examples.SecondarySort.Int
> >      Pair>.compare
> >
> > Thank you,
> > Mark
>

Re: Hadoop examples don't compile in Eclipse

Posted by Mark Kerzner <ma...@shmsoft.com>.
Indeed, Stan, it worked.

Thank you,
Mark

On Mon, Sep 3, 2012 at 9:42 PM, Stan Rosenberg <st...@gmail.com>wrote:

> Hi Mark,
>
> Make sure that you enable java 1.6 for your project.  More info is
> available here:
>
> http://stackoverflow.com/questions/987973/why-does-eclipse-complain-about-override-on-interface-methods
>
> stan
>
> On Mon, Sep 3, 2012 at 10:13 PM, Mark Kerzner <ma...@shmsoft.com>
> wrote:
> > Hi,
> >
> > this is really all over, but for example, in SecondarySort.java, this
> line
> > causes a problem:
> >
> > @Override
> >         public int compare(IntPair o1, IntPair o2) {
> >
> > It works beautifully in NB, but in Eclipse it was the "Override" removed,
> > with the following message:
> >
> > Multiple markers at this line
> >     - The method compare(SecondarySort.IntPair, SecondarySort.IntPair) of
> >      type SecondarySort.FirstGroupingComparator must override a
> superclass
> >      method
> >     - implements
> >
> > java.util.Comparator<com.intel.hadooptraining.examples.SecondarySort.Int
> >      Pair>.compare
> >
> > Thank you,
> > Mark
>

Re: Hadoop examples don't compile in Eclipse

Posted by Stan Rosenberg <st...@gmail.com>.
Hi Mark,

Make sure that you enable java 1.6 for your project.  More info is
available here:
http://stackoverflow.com/questions/987973/why-does-eclipse-complain-about-override-on-interface-methods

stan

On Mon, Sep 3, 2012 at 10:13 PM, Mark Kerzner <ma...@shmsoft.com> wrote:
> Hi,
>
> this is really all over, but for example, in SecondarySort.java, this line
> causes a problem:
>
> @Override
>         public int compare(IntPair o1, IntPair o2) {
>
> It works beautifully in NB, but in Eclipse it was the "Override" removed,
> with the following message:
>
> Multiple markers at this line
>     - The method compare(SecondarySort.IntPair, SecondarySort.IntPair) of
>      type SecondarySort.FirstGroupingComparator must override a superclass
>      method
>     - implements
>
> java.util.Comparator<com.intel.hadooptraining.examples.SecondarySort.Int
>      Pair>.compare
>
> Thank you,
> Mark

Re: Hadoop examples don't compile in Eclipse

Posted by Stan Rosenberg <st...@gmail.com>.
Hi Mark,

Make sure that you enable java 1.6 for your project.  More info is
available here:
http://stackoverflow.com/questions/987973/why-does-eclipse-complain-about-override-on-interface-methods

stan

On Mon, Sep 3, 2012 at 10:13 PM, Mark Kerzner <ma...@shmsoft.com> wrote:
> Hi,
>
> this is really all over, but for example, in SecondarySort.java, this line
> causes a problem:
>
> @Override
>         public int compare(IntPair o1, IntPair o2) {
>
> It works beautifully in NB, but in Eclipse it was the "Override" removed,
> with the following message:
>
> Multiple markers at this line
>     - The method compare(SecondarySort.IntPair, SecondarySort.IntPair) of
>      type SecondarySort.FirstGroupingComparator must override a superclass
>      method
>     - implements
>
> java.util.Comparator<com.intel.hadooptraining.examples.SecondarySort.Int
>      Pair>.compare
>
> Thank you,
> Mark

Re: Hadoop examples don't compile in Eclipse

Posted by Stan Rosenberg <st...@gmail.com>.
Hi Mark,

Make sure that you enable java 1.6 for your project.  More info is
available here:
http://stackoverflow.com/questions/987973/why-does-eclipse-complain-about-override-on-interface-methods

stan

On Mon, Sep 3, 2012 at 10:13 PM, Mark Kerzner <ma...@shmsoft.com> wrote:
> Hi,
>
> this is really all over, but for example, in SecondarySort.java, this line
> causes a problem:
>
> @Override
>         public int compare(IntPair o1, IntPair o2) {
>
> It works beautifully in NB, but in Eclipse it was the "Override" removed,
> with the following message:
>
> Multiple markers at this line
>     - The method compare(SecondarySort.IntPair, SecondarySort.IntPair) of
>      type SecondarySort.FirstGroupingComparator must override a superclass
>      method
>     - implements
>
> java.util.Comparator<com.intel.hadooptraining.examples.SecondarySort.Int
>      Pair>.compare
>
> Thank you,
> Mark

Re: Hadoop examples don't compile in Eclipse

Posted by Stan Rosenberg <st...@gmail.com>.
Hi Mark,

Make sure that you enable java 1.6 for your project.  More info is
available here:
http://stackoverflow.com/questions/987973/why-does-eclipse-complain-about-override-on-interface-methods

stan

On Mon, Sep 3, 2012 at 10:13 PM, Mark Kerzner <ma...@shmsoft.com> wrote:
> Hi,
>
> this is really all over, but for example, in SecondarySort.java, this line
> causes a problem:
>
> @Override
>         public int compare(IntPair o1, IntPair o2) {
>
> It works beautifully in NB, but in Eclipse it was the "Override" removed,
> with the following message:
>
> Multiple markers at this line
>     - The method compare(SecondarySort.IntPair, SecondarySort.IntPair) of
>      type SecondarySort.FirstGroupingComparator must override a superclass
>      method
>     - implements
>
> java.util.Comparator<com.intel.hadooptraining.examples.SecondarySort.Int
>      Pair>.compare
>
> Thank you,
> Mark