You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Hadoop QA (JIRA)" <ji...@apache.org> on 2015/07/08 09:21:04 UTC

[jira] [Commented] (HADOOP-12206) The preceding invocations of findlargest in test-patch effect the following invocations result

    [ https://issues.apache.org/jira/browse/HADOOP-12206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14618130#comment-14618130 ] 

Hadoop QA commented on HADOOP-12206:
------------------------------------

(!) A patch to the files used for the QA process has been detected. 
Re-executing against the patched versions to perform further tests. 
The console is at https://builds.apache.org/job/PreCommit-HADOOP-Build/7192/console in case of problems.

> The preceding invocations of findlargest in test-patch effect the following invocations result
> ----------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-12206
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12206
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: yetus
>            Reporter: Kengo Seki
>            Assignee: Kengo Seki
>              Labels: newbie
>         Attachments: HADOOP-12206.HADOOP-12111.01.patch
>
>
> Because $maxlen is not defined as a local variable, the preceding invocations effect the following results.
> {code}
> function findlargest
> {
>   local column=$1
>   shift
>   local a=("$@")
>   local sizeofa=${#a[@]}
>   local i=0
>   until [[ ${i} -gt ${sizeofa} ]]; do
>     # shellcheck disable=SC2086
>     string=$( echo ${a[$i]} | cut -f$((column + 1)) -d\| )
>     if [[ ${#string} -gt $maxlen ]]; then
>       maxlen=${#string}
>     fi
>     i=$((i+1))
>   done
>   echo "${maxlen}"
> }
> {code}
> Also, {code}until [[ ${i} -gt ${sizeofa} ]]; do{code} should be -eq or -ge.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)