MAPREDUCE-3302. Remove the last dependency call from org.apache.hadoop.record package in MR. (harsh)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1342613 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Harsh J 2012-05-25 13:21:30 +00:00
parent ceaf168dc7
commit 2ebb1f47db
2 changed files with 5 additions and 1 deletions

View File

@ -52,6 +52,9 @@ Trunk (unreleased changes)
HADOOP-8285 MR changes for Use ProtoBuf for RpcPayLoadHeader (sanjay radia)
MAPREDUCE-3302. Remove the last dependency call from
org.apache.hadoop.record package in MR. (harsh)
BUG FIXES
MAPREDUCE-4100. [Gridmix] Bug fixed in compression emulation feature for

View File

@ -29,6 +29,7 @@ import javax.servlet.http.HttpServletRequest;
import org.apache.commons.codec.binary.Base64;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
import org.apache.hadoop.io.WritableComparator;
import org.apache.hadoop.mapreduce.security.token.JobTokenSecretManager;
import org.apache.hadoop.record.Utils;
@ -67,7 +68,7 @@ public class SecureShuffleUtils {
*/
private static boolean verifyHash(byte[] hash, byte[] msg, SecretKey key) {
byte[] msg_hash = generateByteHash(msg, key);
return Utils.compareBytes(msg_hash, 0, msg_hash.length, hash, 0, hash.length) == 0;
return WritableComparator.compareBytes(msg_hash, 0, msg_hash.length, hash, 0, hash.length) == 0;
}
/**