hadoop shell producing unexpected output to stdout --------------------------------------------------
Key: HADOOP-7039 URL: https://issues.apache.org/jira/browse/HADOOP-7039 Project: Hadoop Common Issue Type: Bug Components: security, util Affects Versions: 0.21.0 Reporter: Charles Thayer Priority: Minor Using "hadoop fs -dus foobar/*" I found unexpected output to stdout as the first line prints some debugging information about kerberos tokens. This is breaking scripts which used to work with 0.20.x. Retrieving token from: https://1.2.3.4:50470/getDelegationToken hftp://blah.yahoo.net:50070/foo/bang 685256 hftp://blah.yahoo.net:50070/foo/bar 685256 hftp://blah.yahoo.net:50070/foo/baz 685256 [...] Which appears to be coming from this line ./hadoop-0.21.0/hdfs/src/java/org/apache/hadoop/hdfs/tools/DelegationTokenFetcher.java:151: System.out.println("Retrieving token from: " + I also see a few other cases here which should be changed to use a logging service, changed to System.err, or removed: grep -n -2 System.out ./hadoop-0.21.0/hdfs/src/java/org/apache/hadoop/hdfs/tools/DelegationTokenFetcher.java 90- 91- out.flush(); 92: System.out.println("Succesfully wrote token of size " + 93- out.size() + " bytes to "+ args[0]); 94- } catch (IOException ioe) { 95: System.out.println("Exception encountered:\n" + 96- StringUtils.stringifyException(ioe)); 97- } finally { -- 149- 150- try { 151: System.out.println("Retrieving token from: " + 152- nnAddr + DelegationTokenServlet.PATH_SPEC + ugiPostfix); 153- URL remoteURL = new URL(nnAddr + DelegationTokenServlet.PATH_SPEC + ugiPostfix); -- 161- ts.write(file); 162- file.flush(); 163: System.out.println("Successfully wrote token of " + file.size() 164- + " bytes to " + filename); 165- } catch (Exception e) { -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.