HADOOP-10474. Merge r1585886 from trunk.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1585887 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Haohui Mai 2014-04-09 04:10:23 +00:00
parent ade0ff5b06
commit 56268ffc41
59 changed files with 51 additions and 21 deletions

View File

@ -4,6 +4,8 @@ Release 2.5.0 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES
HADOOP-10474 Move o.a.h.record to hadoop-streaming. (wheat9)
NEW FEATURES NEW FEATURES
IMPROVEMENTS IMPROVEMENTS

View File

@ -15,9 +15,6 @@
limitations under the License. limitations under the License.
--> -->
<FindBugsFilter> <FindBugsFilter>
<Match>
<Package name="org.apache.hadoop.record.compiler.generated" />
</Match>
<Match> <Match>
<Package name="org.apache.hadoop.security.proto" /> <Package name="org.apache.hadoop.security.proto" />
</Match> </Match>
@ -196,21 +193,6 @@
<Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS" /> <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS" />
</Match> </Match>
<Match>
<Class name="org.apache.hadoop.record.meta.Utils" />
<Method name="skip" />
<Bug pattern="BC_UNCONFIRMED_CAST" />
</Match>
<!--
The compareTo method is actually a dummy method that just
throws excpetions. So, no need to override equals. Ignore
-->
<Match>
<Class name="org.apache.hadoop.record.meta.RecordTypeInfo" />
<Bug pattern="EQ_COMPARETO_USE_OBJECT_EQUALS" />
</Match>
<Match> <Match>
<Class name="org.apache.hadoop.util.ProcfsBasedProcessTree" /> <Class name="org.apache.hadoop.util.ProcfsBasedProcessTree" />
<Bug pattern="DMI_HARDCODED_ABSOLUTE_FILENAME" /> <Bug pattern="DMI_HARDCODED_ABSOLUTE_FILENAME" />

View File

@ -202,7 +202,7 @@
<dependency> <dependency>
<groupId>org.apache.ant</groupId> <groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId> <artifactId>ant</artifactId>
<scope>provided</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.google.protobuf</groupId> <groupId>com.google.protobuf</groupId>

View File

@ -31,8 +31,8 @@ import org.apache.commons.logging.LogFactory;
import org.apache.commons.codec.binary.Base64; import org.apache.commons.codec.binary.Base64;
import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability; import org.apache.hadoop.classification.InterfaceStability;
import org.apache.hadoop.io.WritableComparator;
import org.apache.hadoop.mapreduce.security.token.JobTokenSecretManager; import org.apache.hadoop.mapreduce.security.token.JobTokenSecretManager;
import org.apache.hadoop.record.Utils;
import com.google.common.base.Charsets; import com.google.common.base.Charsets;
@ -74,7 +74,7 @@ public class SecureShuffleUtils {
*/ */
private static boolean verifyHash(byte[] hash, byte[] msg, SecretKey key) { private static boolean verifyHash(byte[] hash, byte[] msg, SecretKey key) {
byte[] msg_hash = generateByteHash(msg, 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;
} }
/** /**

View File

@ -16,6 +16,19 @@
limitations under the License. limitations under the License.
--> -->
<FindBugsFilter> <FindBugsFilter>
<!-- Workaround bugs in findbugs 1.3.9. See http://sourceforge.net/p/findbugs/bugs/918 for more details. -->
<Match>
<Or>
<Package name="org.apache.hadoop.streaming" />
<Class name="org.apache.hadoop.record.compiler.JFile" />
</Or>
<Bug pattern="NP_ALWAYS_NULL"/>
</Match>
<Match>
<Class name="org.apache.hadoop.streaming.JarBuilder" />
<Bug pattern="NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS"/>
</Match>
<Match> <Match>
<Or> <Or>
<Class name="org.apache.hadoop.streaming.PipeMapper" /> <Class name="org.apache.hadoop.streaming.PipeMapper" />
@ -27,4 +40,32 @@
</Or> </Or>
<Bug pattern="EI_EXPOSE_REP"/> <Bug pattern="EI_EXPOSE_REP"/>
</Match> </Match>
<Match>
<Package name="org.apache.hadoop.record.compiler.generated" />
</Match>
<Match>
<Package name="org.apache.hadoop.record" />
<Or>
<Bug pattern="EI_EXPOSE_REP" />
<Bug pattern="EI_EXPOSE_REP2" />
<Bug pattern="MS_PKGPROTECT" />
</Or>
</Match>
<Match>
<Class name="org.apache.hadoop.record.meta.Utils" />
<Method name="skip" />
<Bug pattern="BC_UNCONFIRMED_CAST" />
</Match>
<!--
The compareTo method is actually a dummy method that just
throws excpetions. So, no need to override equals. Ignore
-->
<Match>
<Class name="org.apache.hadoop.record.meta.RecordTypeInfo" />
<Bug pattern="EQ_COMPARETO_USE_OBJECT_EQUALS" />
</Match>
</FindBugsFilter> </FindBugsFilter>

View File

@ -41,6 +41,11 @@
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<scope>provided</scope>
</dependency>
<dependency> <dependency>
<groupId>org.apache.hadoop</groupId> <groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-annotations</artifactId> <artifactId>hadoop-annotations</artifactId>