impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars Volker (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-5624: Replace "ls -l" with opendir() in ProcessStateInfo
Date Fri, 17 Nov 2017 23:55:31 GMT
Lars Volker has posted comments on this change. ( )

Change subject: IMPALA-5624: Replace "ls -l" with opendir() in ProcessStateInfo

Patch Set 4:

Commit Message:
PS4, Line 11: api
nit: acronyms are usually all caps
File be/src/util/process-state-info.h:
PS4, Line 77: /// File Descriptors information will be read from /proc/pid/fd.
nit: /proc/self/fd
File be/src/util/
PS4, Line 155: does
nit: do not count.
PS4, Line 156: self
nit: either use getpid() here to be consistent with the rest of the file, or change the other
occurrences to /proc/self/*
PS4, Line 159: dir
Can you try to think of better variable names? You have a DIR called d, and something else
called dir. DIR is really a directory stream, and readdir returns directory entries.
PS4, Line 160:     while ((dir = readdir(d)) != nullptr) ++fd_count;
Please add a brief comment why your usage of readdir is thread-safe here.
PS4, Line 163: std::
You shouldn't need std:: here

To view, visit
To unsubscribe, visit

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibffae8069a62e100abbfa7d558b49040b095ddc0
Gerrit-Change-Number: 8546
Gerrit-PatchSet: 4
Gerrit-Owner: Csaba Ringhofer <>
Gerrit-Reviewer: Csaba Ringhofer <>
Gerrit-Reviewer: Dan Hecht <>
Gerrit-Reviewer: Lars Volker <>
Gerrit-Reviewer: Philip Zeyliger <>
Gerrit-Comment-Date: Fri, 17 Nov 2017 23:55:31 +0000
Gerrit-HasComments: Yes

  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message