[ https://issues.apache.org/jira/browse/HDFS-9438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15025881#comment-15025881 ]
Yongjun Zhang commented on HDFS-9438: ------------------------------------- Thanks [~jzhuge] for the new rev and [~aw] for the review. One comment: this should be in the dbeug code block. +1 after that. {code} String[] scmd = new String[] {"/bin/sh", "-c", "ulimit -a"}; ShellCommandExecutor sce = new ShellCommandExecutor(scmd); sce.execute(); {code} Hi [~aw], this block of code (including whoami) is only for debugging purpose and they should run on the selected platforms. I do see other code also refers to whoami as you mentioned, I personally think whether/when to drop it belong to a different jira. Agree? {code} ind . -name "*java" -exec grep whoami {} \; -print public static final String USER_NAME_COMMAND = "whoami"; ./hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java String qualifiedUsername = Shell.execCommand("whoami").trim(); ./hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestWinUtils.java Process pp = Runtime.getRuntime().exec("whoami"); ./hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestUserGroupInformation.java Process pp = Runtime.getRuntime().exec("whoami"); // On Windows domain joined machine, whoami returns the username ./hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestProxyUserFromEnv.java String whoami = RegistryUtils.getCurrentUsernameUnencoded("drwho"); assertEquals("drwho", whoami); String whoami = RegistryUtils.getCurrentUsernameUnencoded(""); assertEquals(ugiUser, whoami); ./hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/test/java/org/apache/hadoop/registry/client/binding/TestRegistryOperationUtils.java {code} Thanks. > TestPipelinesFailover assumes Linux ifconfig > -------------------------------------------- > > Key: HDFS-9438 > URL: https://issues.apache.org/jira/browse/HDFS-9438 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: test > Affects Versions: 2.7.1 > Environment: Solaris > Reporter: Alan Burlison > Assignee: John Zhuge > Priority: Minor > Attachments: HDFS-9438-hdfs-9438.001.patch, > HDFS-9438-hdfs-9438.002.patch, HDFS-9438-hdfs-9438.003.patch, > HDFS-9438-hdfs-9438.004.patch > > > TestPipelinesFailover.java contains the following: > {code} > scmd = new String[] {"ifconfig"}; > sce = new ShellCommandExecutor(scmd); > sce.execute(); > System.out.println("'ifconfig' output:\n" + sce.getOutput()); > {code} > That assumes the Linux ifconfig command. If the flag "-a" is added, the same > invocation should work on both Linux and Solaris - the output is only > displayed for debugging purposes so the fact that the output of ifconfig is > different on Linux and Solaris shouldn't matter. -- This message was sent by Atlassian JIRA (v6.3.4#6332)