accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <>
Subject [jira] [Commented] (ACCUMULO-2378) Fix use of LOGNAME in functional tests under MR
Date Wed, 19 Feb 2014 14:38:23 GMT


ASF subversion and git services commented on ACCUMULO-2378:

Commit 389831727a8f6ab2fda98f279a5cba442081ca69 in accumulo's branch refs/heads/1.5.1-SNAPSHOT
from [~bhavanki]
[;h=3898317 ]

ACCUMULO-2378 Replace LOGNAME usage in with getpass

When running functional tests under MapReduce, the LOGNAME environment variable is
not available. This change switches to use getpass.getuser(), which
looks for a variety of environment variables to locate the current user, and which
works more reliably.

> Fix use of LOGNAME in functional tests under MR
> -----------------------------------------------
>                 Key: ACCUMULO-2378
>                 URL:
>             Project: Accumulo
>          Issue Type: Sub-task
>          Components: test
>    Affects Versions: 1.4.4, 1.5.0
>            Reporter: Bill Havanki
>            Assignee: Bill Havanki
>              Labels: mapreduce, test
> When running a functional test under MR:
> {noformat}
> 2014-02-18 12:13:48,296 INFO org.apache.accumulo.test.functional.RunTests: More:   File
"test/system/auto/", line 30, in <module>
>     from TestUtils import ACCUMULO_HOME, ACCUMULO_DIR, COBERTURA_HOME, findCoberturaJar
>   File "/usr/lib/accumulo/test/system/auto/", line 45, in <module>
>     ACCUMULO_DIR = "/user/" + os.getenv('LOGNAME') + "/accumulo-" + ID
> TypeError: cannot concatenate 'str' and 'NoneType' objects
> {noformat}
> Originally noted by [~jfield]:
> bq. The cause of the bug is that the os.getenv('LOGNAME') function doesn't work because
LOGNAME isn't defined for the shell the mapreduce job runs as (probably because either there
isn't a parent bash shell or because that shell is non-interactive).
> Error occurs under 1.4.4 and 1.5.0.

This message was sent by Atlassian JIRA

View raw message