You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by aw...@apache.org on 2015/08/10 18:48:05 UTC

[19/19] hadoop git commit: HADOOP-12310. final memory report sometimes generates spurious errors (Kengo Seki via aw)

HADOOP-12310. final memory report sometimes generates spurious errors (Kengo Seki via aw)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/3d888ecc
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/3d888ecc
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/3d888ecc

Branch: refs/heads/HADOOP-12111
Commit: 3d888ecc54cce0eefe77700cab2ac2759f4c030f
Parents: dddec72
Author: Allen Wittenauer <aw...@apache.org>
Authored: Mon Aug 10 09:46:06 2015 -0700
Committer: Allen Wittenauer <aw...@apache.org>
Committed: Mon Aug 10 09:46:06 2015 -0700

----------------------------------------------------------------------
 dev-support/test-patch.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/3d888ecc/dev-support/test-patch.sh
----------------------------------------------------------------------
diff --git a/dev-support/test-patch.sh b/dev-support/test-patch.sh
index 1faf99f..446d5cf 100755
--- a/dev-support/test-patch.sh
+++ b/dev-support/test-patch.sh
@@ -395,9 +395,10 @@ function finish_footer_table
 {
   local maxmem
 
+  # `sort | head` can cause a broken pipe error, but we can ignore it just like compute_gitdiff.
   # shellcheck disable=SC2016,SC2086
   maxmem=$(find "${PATCH_DIR}" -type f -exec ${AWK} 'match($0, /^\[INFO\] Final Memory: [0-9]+/)
-    { print substr($0, 22, RLENGTH-21) }' {} \; | sort -nr | head -n 1)
+    { print substr($0, 22, RLENGTH-21) }' {} \; | sort -nr 2>/dev/null | head -n 1)
 
   if [[ -n ${maxmem} ]]; then
     add_footer_table "Max memory used" "${maxmem}MB"