hadoop-hdfs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Nauroth <cnaur...@hortonworks.com>
Subject Re: Deprecation Error
Date Thu, 16 Apr 2015 17:56:27 GMT
Hello Anand,

MapReduce provides 2 similar but slightly different public APIs for writing jobs.  The original
API is in the org.apache.hadoop.mapred package, and a revised version is in the org.apache.hadoop.mapreduce
package.  The JavaDocs provide examples of both:



A common problem is attempting to mix classes from one package with classes from the other
package.  For example, you might be trying to call org.apache.hadoop.mapreduce.Job#setMapperClass
with a class that implements org.apache.hadoop.mapred.Mapper instead of subclassing org.apache.hadoop.mapreduce.Mapper.

I hope this helps.

Chris Nauroth

From: Anand Murali <anand_vihar@yahoo.com<mailto:anand_vihar@yahoo.com>>
Reply-To: "user@hadoop.apache.org<mailto:user@hadoop.apache.org>" <user@hadoop.apache.org<mailto:user@hadoop.apache.org>>,
Anand Murali <anand_vihar@yahoo.com<mailto:anand_vihar@yahoo.com>>
Date: Tuesday, April 14, 2015 at 2:52 AM
To: "user@hadoop.apache.org<mailto:user@hadoop.apache.org>" <user@hadoop.apache.org<mailto:user@hadoop.apache.org>>
Subject: Deprecation Error


I am using Tom Whyte's text book on Hadoop 2.X for learning. However I have installed 2.6
and using text code to get started. I get the following error on the main class

anand_vihar@Latitude-E5540:~/hadoop-2.6.0/code$ javac -classpath $(hadoop classpath) MaxTemperature.java
MaxTemperature.java:25: error: cannot find symbol
  symbol:   class MaxTemperatureMapper
  location: class MaxTemperature
MaxTemperature.java:26: error: cannot find symbol
  symbol:   class MaxTemperatureReducer
  location: class MaxTemperature
Note: MaxTemperature.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors

Can somebody advise me what are the equivalent API for setMapperClass/SetReducer class, and
where I can find the delta differences between 2.x and 2,6.



Anand Murali
11/7, 'Anand Vihar', Kandasamy St, Mylapore
Chennai - 600 004, India
Ph: (044)- 28474593/ 43526162 (voicemail)

View raw message