Csaba Ringhofer has posted comments on this change. ( http://gerrit.cloudera.org:8080/8546 )
Change subject: IMPALA-5624: Replace "ls -l" with opendir() in ProcessStateInfo ...................................................................... Patch Set 6: (4 comments) http://gerrit.cloudera.org:8080/#/c/8546/5/be/src/util/process-state-info.h File be/src/util/process-state-info.h: http://gerrit.cloudera.org:8080/#/c/8546/5/be/src/util/process-state-info.h@61 PS5, Line 61: /// Below are some of the Process status information that will be read > nit: long line. Please have a look at how to configure your text editor to Done http://gerrit.cloudera.org:8080/#/c/8546/5/be/src/util/process-state-info.cc File be/src/util/process-state-info.cc: http://gerrit.cloudera.org:8080/#/c/8546/5/be/src/util/process-state-info.cc@36 PS5, Line 36: using boost::algorithm::is_any_of; > nit: sort alphabetically? Done http://gerrit.cloudera.org:8080/#/c/8546/5/be/src/util/process-state-info.cc@157 PS5, Line 157: // readdir() is not thread-safe according to its man page, but in glibc > Can you include a reference to the source (e.g. https://www.gnu.org/softwar Done http://gerrit.cloudera.org:8080/#/c/8546/6/be/src/util/process-state-info.cc File be/src/util/process-state-info.cc: http://gerrit.cloudera.org:8080/#/c/8546/6/be/src/util/process-state-info.cc@161 PS6, Line 161: if(dir_entry->d_name[0] != '.') ++fd_count; // . and .. do not count www.gnu.org/software/libc/manual/html_node/Reading_002fClosing-Directory.html states: "Portability Note: On some systems readdir may not return entries for . and ..," Because of this, the filename must be checked to return the exact number of descriptors. As every filename in fd directory is a number, it is enough to check the first character. -- To view, visit http://gerrit.cloudera.org:8080/8546 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibffae8069a62e100abbfa7d558b49040b095ddc0 Gerrit-Change-Number: 8546 Gerrit-PatchSet: 6 Gerrit-Owner: Csaba Ringhofer <csringho...@cloudera.com> Gerrit-Reviewer: Csaba Ringhofer <csringho...@cloudera.com> Gerrit-Reviewer: Dan Hecht <dhe...@cloudera.com> Gerrit-Reviewer: Lars Volker <l...@cloudera.com> Gerrit-Reviewer: Philip Zeyliger <phi...@cloudera.com> Gerrit-Comment-Date: Mon, 20 Nov 2017 18:51:25 +0000 Gerrit-HasComments: Yes