impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcel Kornacker (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-4623: Enable file handle cache
Date Tue, 11 Apr 2017 01:03:20 GMT
Marcel Kornacker has posted comments on this change.

Change subject: IMPALA-4623: Enable file handle cache

Patch Set 3:


i don't understand the need for unique_ptrs for the file handles, please see comments inline.
File be/src/runtime/

Line 286:   if (fs_ != NULL) {
replace w/ nullptr throughout (and in the other files you touch).
File be/src/runtime/disk-io-mgr.h:

Line 205:   /// additionally encapsulates the last modified time of the associated file when
it was
fix this sentence.

Line 207:   class HdfsCachedFileHandle {
we use this class exclusively to access hdfs data, even if the file handle isn't cached. remove
'cached' from the name, it's distracting.

Line 476:     /// Opens the file for this range. This function only modifies state in this
explain param

Line 489:     void GetHdfsStatistics(hdfsFile fh);
is this okay to pass by value?

what diskiorequestcontext is this referring to? the comment should make sense on its own.

Line 521:     /// File handle for local fs (FILE*)
remove (file*)

Line 526:     std::unique_ptr<HdfsCachedFileHandle> hdfs_file_;
requestrange already contains an fs_. what of  the functionality provided by hdfscachedfilehandle
do you actually need here? this class also contains an mtime_, so lots of confusing and error-prone

this encapsulates a file handle out of the cache. but if the cache is used to manage all file
handles, why do you need to store this with a unique_ptr (instead of a raw ptr, and then simply
hand that back to the cache when you're done)? this looks like it contradicts the responsibility
of the cache for managing file handles.

Line 774:   /// and return an instance of HdfsCachedFileHandle. In case of an error returns
explain all parameters

Line 784:       std::unique_ptr<HdfsCachedFileHandle>& fid);
no ref parameters

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibe5ff60971dd653c3b6a0e13928cfa9fc59d078d
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Joe McDonnell <>
Gerrit-Reviewer: Dan Hecht <>
Gerrit-Reviewer: Joe McDonnell <>
Gerrit-Reviewer: Marcel Kornacker <>
Gerrit-Reviewer: Tim Armstrong <>
Gerrit-HasComments: Yes

View raw message