Return-Path: X-Original-To: apmail-hadoop-mapreduce-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 549EE7D0F for ; Sun, 11 Dec 2011 20:25:12 +0000 (UTC) Received: (qmail 36760 invoked by uid 500); 11 Dec 2011 20:25:12 -0000 Delivered-To: apmail-hadoop-mapreduce-issues-archive@hadoop.apache.org Received: (qmail 36731 invoked by uid 500); 11 Dec 2011 20:25:12 -0000 Mailing-List: contact mapreduce-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mapreduce-issues@hadoop.apache.org Delivered-To: mailing list mapreduce-issues@hadoop.apache.org Received: (qmail 36719 invoked by uid 99); 11 Dec 2011 20:25:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Dec 2011 20:25:12 +0000 X-ASF-Spam-Status: No, hits=-2001.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Dec 2011 20:25:02 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 27A9D10D1B8 for ; Sun, 11 Dec 2011 20:24:41 +0000 (UTC) Date: Sun, 11 Dec 2011 20:24:41 +0000 (UTC) From: "Harsh J (Updated) (JIRA)" To: mapreduce-issues@hadoop.apache.org Message-ID: <1289939654.62942.1323635081163.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1718145984.30810.1319799392334.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (MAPREDUCE-3302) Remove the last dependency call from org.apache.hadoop.record package in MR. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/MAPREDUCE-3302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Harsh J updated MAPREDUCE-3302: ------------------------------- Resolution: Invalid Status: Resolved (was: Patch Available) Per parent JIRA, recordio is still in use apparently. Resolving as won't fix. > Remove the last dependency call from org.apache.hadoop.record package in MR. > ---------------------------------------------------------------------------- > > Key: MAPREDUCE-3302 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-3302 > Project: Hadoop Map/Reduce > Issue Type: Task > Components: client > Affects Versions: 0.24.0 > Reporter: Harsh J > Assignee: Harsh J > Priority: Minor > Fix For: 0.24.0 > > Attachments: MAPREDUCE-3302.patch > > > SecureShuffleUtils provides the following helper: > {code} > /** > * verify that hash equals to HMacHash(msg) > * @param newHash > * @return true if is the same > */ > 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; > } > {code} > The {{Utils}} class used there is {{org.apache.hadoop.record.Utils}}. With the {{record}} common package going away via HADOOP-7781, the internal (and also deprecated on the whole) {{compareBytes}} utility must be moved elsewhere. > The {{Utils#compareBytes}} contains: > {code} > /** Lexicographic order of binary data. */ > public static int compareBytes(byte[] b1, int s1, int l1, > byte[] b2, int s2, int l2) { > return WritableComparator.compareBytes(b1, s1, l1, b2, s2, l2); > } > {code} > Which looks like it can be replaced inline, as it appears to be a dummy wrapper call. I'll put up a patch with this inline replacement shortly for review. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira