MAPREDUCE-5190. Unnecessary condition test in RandomSampler. Contributed by Jingguo Yao.
This commit is contained in:
parent
b46c2bb51a
commit
1d5c796d65
@ -256,6 +256,9 @@ Release 2.8.0 - UNRELEASED
|
|||||||
|
|
||||||
IMPROVEMENTS
|
IMPROVEMENTS
|
||||||
|
|
||||||
|
MAPREDUCE-5190. Unnecessary condition test in RandomSampler.
|
||||||
|
(Jingguo Yao via harsh)
|
||||||
|
|
||||||
MAPREDUCE-6239. Consolidate TestJobConf classes in
|
MAPREDUCE-6239. Consolidate TestJobConf classes in
|
||||||
hadoop-mapreduce-client-jobclient and hadoop-mapreduce-client-core
|
hadoop-mapreduce-client-jobclient and hadoop-mapreduce-client-core
|
||||||
(Varun Saxena via harsh)
|
(Varun Saxena via harsh)
|
||||||
|
@ -230,10 +230,8 @@ public K[] getSample(InputFormat<K,V> inf, Job job)
|
|||||||
// to reflect the possibility of existing elements being
|
// to reflect the possibility of existing elements being
|
||||||
// pushed out
|
// pushed out
|
||||||
int ind = r.nextInt(numSamples);
|
int ind = r.nextInt(numSamples);
|
||||||
if (ind != numSamples) {
|
samples.set(ind, ReflectionUtils.copy(job.getConfiguration(),
|
||||||
samples.set(ind, ReflectionUtils.copy(job.getConfiguration(),
|
reader.getCurrentKey(), null));
|
||||||
reader.getCurrentKey(), null));
|
|
||||||
}
|
|
||||||
freq *= (numSamples - 1) / (double) numSamples;
|
freq *= (numSamples - 1) / (double) numSamples;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user