From e921428d1aa18de97cc6a567869f8336c670ec8f Mon Sep 17 00:00:00 2001 From: Arpit Agarwal Date: Tue, 24 Jun 2014 17:16:14 +0000 Subject: [PATCH] HADOOP-10746: Merging r1605140 from trunk to branch-2. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1605141 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../src/main/java/org/apache/hadoop/util/Shell.java | 3 +++ .../java/org/apache/hadoop/net/TestSocketIOWithTimeout.java | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 0a786363a7c..59c8f411a6f 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -248,6 +248,9 @@ Release 2.5.0 - UNRELEASED HADOOP-9559. When metrics system is restarted MBean names get incorrectly flagged as dupes. (Mostafa Elhemali and Mike Liddell via cnauroth) + HADOOP-10746. TestSocketIOWithTimeout#testSocketIOWithTimeout fails on + Power PC. (Jinghui Wang via Arpit Agarwal) + BREAKDOWN OF HADOOP-10514 SUBTASKS AND RELATED JIRAS HADOOP-10520. Extended attributes definition and FileSystem APIs for diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java index e6f24a87764..69ac088fca9 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java @@ -126,6 +126,9 @@ abstract public class Shell { public static final boolean LINUX = (osType == OSType.OS_TYPE_LINUX); public static final boolean OTHER = (osType == OSType.OS_TYPE_OTHER); + public static final boolean PPC_64 + = System.getProperties().getProperty("os.arch").contains("ppc64"); + /** a Unix command to get the current user's groups list */ public static String[] getGroupsCommand() { return (WINDOWS)? new String[]{"cmd", "/c", "groups"} diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestSocketIOWithTimeout.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestSocketIOWithTimeout.java index 476525bee67..f29fcf9ab5e 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestSocketIOWithTimeout.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestSocketIOWithTimeout.java @@ -151,7 +151,7 @@ public class TestSocketIOWithTimeout { // simulate a partial write scenario. Attempts were made to switch the // test from using a pipe to a network socket and also to use larger and // larger buffers in doIO. Nothing helped the situation though. - if (!Shell.WINDOWS) { + if (!Shell.WINDOWS && !Shell.PPC_64) { try { out.write(1); fail("Did not throw");