Browse Source

MAPREDUCE-5020. Compile failure with JDK8 (Trevor Robinson via tgraves)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1521576 13f79535-47bb-0310-9956-ffa450edef68
Thomas Graves 11 years ago
parent
commit
75c31df9dd

+ 2 - 0
hadoop-mapreduce-project/CHANGES.txt

@@ -256,6 +256,8 @@ Release 2.1.1-beta - UNRELEASED
     MAPREDUCE-5414. TestTaskAttempt fails in JDK7 with NPE (Nemon Lou via 
     devaraj)
 
+    MAPREDUCE-5020. Compile failure with JDK8 (Trevor Robinson via tgraves)
+
 Release 2.1.0-beta - 2013-08-22
 
   INCOMPATIBLE CHANGES

+ 1 - 1
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/partition/InputSampler.java

@@ -317,7 +317,7 @@ public class InputSampler<K,V> extends Configured implements Tool  {
     final InputFormat inf = 
         ReflectionUtils.newInstance(job.getInputFormatClass(), conf);
     int numPartitions = job.getNumReduceTasks();
-    K[] samples = sampler.getSample(inf, job);
+    K[] samples = (K[])sampler.getSample(inf, job);
     LOG.info("Using " + samples.length + " samples");
     RawComparator<K> comparator =
       (RawComparator<K>) job.getSortComparator();