impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcel Kornacker (Code Review)" <ger...@cloudera.org>
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:

(9 comments)

i don't understand the need for unique_ptrs for the file handles, please see comments inline.

http://gerrit.cloudera.org:8080/#/c/6478/3/be/src/runtime/disk-io-mgr-scan-range.cc
File be/src/runtime/disk-io-mgr-scan-range.cc:

Line 286:   if (fs_ != NULL) {
replace w/ nullptr throughout (and in the other files you touch).


http://gerrit.cloudera.org:8080/#/c/6478/3/be/src/runtime/disk-io-mgr.h
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
range.
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
duplication.

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
NULL.
explain all parameters


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


-- 
To view, visit http://gerrit.cloudera.org:8080/6478
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibe5ff60971dd653c3b6a0e13928cfa9fc59d078d
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Joe McDonnell <joemcdonnell@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dhecht@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <joemcdonnell@cloudera.com>
Gerrit-Reviewer: Marcel Kornacker <marcel@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstrong@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message